2

I have a system running that has 2 sub-domains like the following.

  • authentication.mydomain.com

  • application.mydomain.com

both are MVC applications and we have ASP.NET Identity setup for site membership. all registration/membership related processing is handled at authentication.mydomain.com and also the sign-in/sign-out process is meant to be in this server.

We have setup the same machine key in both the servers in the web.config and the authentication cookie is set to the parent domain. so the cross sub-domain authorization works without an issue. but we need to implement a POST from the application domain to the authentication domain with an Anti-Forgery token and this does not work and i get the following error.

The anti-forgery cookie token and form field token do not match.

What am i doing wrong. and how do i get it to work across sub-domains?

1 Answer 1

0

I believe you need to set the CookieName property in config. Please check this post ASP.NET MVC anti-forgery token demystified

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.