This is a nice addition in 4.5. In my Cookie-based TempData provider I used this exact technique — I didn’t want to reinvent crypto or introduce new keys, so leveraging the ASP.NET machine key APIs made a lot of sense.
Dec 11, 2013 05:17 AMwertzui01LINK
I want to pass the authentication cookie from my ASP.Net MVC 5 (.Net 4.5.1, hosted locally on iisexpress, run from Visual Studio) to my WCF Service (.Net 4.5.1, hosted locally on WcfSvcHost, run from same Visual Studio Solution) and decrypt it there.
I have configured both to use the same machinekey (Web.config for ASP, App.config for WCF):
Both reference the Same System.Web.dll:
> C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.5.1System.Web.dll (v4.0.30319)
But when i try to pass the cookieString to my Service and call
I get the Following Error:
> Unable to validate data
Escape from tarkov activation key generator. I tried it the other way around (generate a fake ticket on WCF service and decrypt on ASP website), which did not work either.
I can generate a ticket on the ASP website and decrypt it there just fine.
I can also generate a ticket on the Service and decrypt it there without any problems.
I also made a small Console app, created a ticket there and decrypted it on the WCF service without any problems.
So it seems like the ASP Website does not use the specified keys to encrypt or decrypt the data.
Does anyone know what i can do to solve this problem?
formauthenticationWCFmvc5