Questions tagged [machinekey]

143 questions
3
votes
0 answers

ASP.NET shared machineKey across .NET 3.5 and .NET 4 applications

Possible Duplicate: Forms based authentication not working between .Net 2.0 and .Net 4.0 application I have two ASP.NET applications. The first is a .NET 3.5 application and the second is a .NET 4 application. The .NET 3.5 application is…
user140628
2
votes
1 answer

Utilizing machinekey in load-balanced instances without storing decryption key in web.config

I have a load-balanced web app that has two app services, one for east and one for west. An issue has been occurring where AntiForgeryTokens are not being decrypted properly, and in my research this seems to be due to mismatched machinekeys which…
2
votes
1 answer

Extracting the MachineKey from a deployed Azure App Service

I have an ASP.NET 4.6 Web API service running as an Azure App Service in a single App Service Plan in a single region. We are modifying this service to be deployed over several regions with a load balancer in front, and each region will have its own…
2
votes
1 answer

Umbraco Decrypting using MachineKey Encoding in C#

I want to first encrypt some nodes in Umbraco's content editor. The code below is the one I use for encryption. I use MachineKey.Protect for this. try { MailMessage message1 = new MailMessage(); MailMessage…
2
votes
0 answers

Which is the most secured machine key encryption method?

Currently, I am generating the machine key with the validation method 'SHA1'. As I want to generate a more secured machine key than 'SHA1', I have chosen the HMACSHA256 validation. But it is not available in older Windows versions like Windows…
Kathir Subramaniam
  • 1,195
  • 1
  • 13
  • 27
2
votes
0 answers

"Validation of viewstate MAC failed" only when posting back from a mobile browser that has been idle for sometime

I know that this question has been asked frequently on StackOverflow but my case is a bit different. I checked all the answers related to this issue and none solved my problem as in my case it only happens with browsers on mobile devices. I only get…
Rami Zebian
  • 539
  • 1
  • 5
  • 23
2
votes
0 answers

Using OAuth Bearer Token generated in .NET Standard for .NET Core

I have one projected that generate bearer tokens via OAuth from MachineKey. Now I can't seem to find a way to decrypt this token in a .NET Core project since it uses DataProtector and the "Compability" guide seems to point towards something…
Deukalion
  • 2,516
  • 9
  • 32
  • 50
2
votes
0 answers

Setting AES cipher mode for ASP.NET MachineKey from web.config

I try using ASP.NET FormAuthentication for my website authentication. I added machineKey element in my web.config so that I can choose what validation and decryption algorithms to use for my authentication. Looking at the machineKey documentation, I…
samAlvin
  • 1,648
  • 1
  • 11
  • 35
2
votes
1 answer

How does WebResources.axd or ScriptResources.axd actually work?

Where can I learn how WebResources.axd or ScriptResources.axd actually works? What is the string that is appended to the .axd? Does this string change, or is it constant? Is it page, session specific? Can these files be cached on a proxy? How…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
2
votes
1 answer

Is machine key shared between Azure App Service instances?

If I scale out my azure app service, are all the instances sharing the same machine key? I want to use app service for my website with Web API 2.0 + Katana middleware and tokens are issued and validated using the machine key. Azure documentation…
Miroslav Holec
  • 3,139
  • 25
  • 22
2
votes
2 answers

How to delete old cookies after changing to manual machine key and wildcard cookies ASP.NET MVC 4.5

How to delete cookies in ASP.NET after changing machine key but staying on the same sub-domain? Currently we have cookies on example.domain.com, but we need to move to wildcard cookies (.domain.com) so that the cookie also work on foo.domain.com.…
Sindre
  • 3,880
  • 2
  • 26
  • 39
2
votes
1 answer

Why do my "random" MachineKey's Validation Key and Decryption Key both start with the same bytes?

I have an MVC app using .NET 4.5.2. In this app, I set the MachineKey as follows:
Jaxidian
  • 13,081
  • 8
  • 83
  • 125
2
votes
1 answer

How to share session cookie with Identity Server ASP.NET app and OWIN?

I am using Identity Server v2 along with SessionAuthenticationModule. I would like to add a new OWIN app (hosted in IIS) which can share the same session cookie "idsrvauth" with my existing STS. How do I do this please? Can the…
2
votes
1 answer

How to find a server's machinekey if it wasn't set

Trying to transfer servers but a connection string is encrypted and there is no machinekey set in the web.config. Is there anyway to find out what the machinekey was on the old server so we can set it on the new server?
adam
2
votes
1 answer

how to export auto generated machine key

I have been using owin oauth bearer tokens for web.api authentication. I had only a single server. I never needed to custom generate a machine key. Right now, I need to move to a web farm behind a load balancer. I dont want my current users' bearer…
Ahmet
  • 906
  • 1
  • 8
  • 22