0

We got two applications, one a legacy application that uses Asp.Net webforms and a new application which uses MVC. Right now we are leaving links on the old application to navigate to certain pages on MVC and were using "Cookies" to maintain state while redirecting to the new application. When we deploy it on lower environments, the navigation between old and new application is working fine but when I deploy my web site to Production, it will be in a web farm on that environment with a load balancer, will there be any issues in terms of accessing cookies between the applications? If so can anyone point me in the right direction with a good example or resource to handle the possible issues?

We are using IIS 7.5

Thanks in advance.

James
  • 13
  • 4

1 Answers1

1

Cookies will be sent to any node in the web farm without issue, assuming the following are all true:

  1. The ASP web forms site and the MVC site are under the same domain.
  2. The cookie is created with a path that includes both sites.
  3. The load balancer is not configured with any rewrite rules that would interfere with the transmission of the cookie (not very likely)

Also, if the cookie is encrypted with the site's machine key, make sure that the machine key is hardcoded on all web servers' web.config (MVC and web forms) with the same value.

John Wu
  • 50,556
  • 8
  • 44
  • 80
  • [Cookies are not isolated by port](https://stackoverflow.com/questions/1612177/are-http-cookies-port-specific). As long as both are https or both are http. F you need to mix and match protocols, ensure the cookie’s secure attribute is false. – John Wu Dec 04 '17 at 19:43