2

I have published the same app to the same server but on different virtual directories.

https://server.com/test https://server.com/prod

I get the error from the title, I suppose ASP.NET MVC "sees" them as the same website (server.com)

For sure there must be a setup or a configuration to make them work together, but couldn't find anything online.

Cătălin Rădoi
  • 1,804
  • 23
  • 43

1 Answers1

2

I suppose ASP.NET MVC "sees" them as the same website (server.com).

  • No, they are considered as different apps in your webserver.

The problem is about the signing/encryption of the anti-forgery tokens that is governed by the keys held in the section of your web config. if you don't explicitly define them the asp.net will generates them automatically of course they will be unique and different on your two virtual directories and they will be cached on your browser, then when you switch requsts between your two instance you got this error.

the solution is here.

more details here.

Vahid
  • 474
  • 2
  • 7
  • 20