Reputation:
We have an intranet website using ASP.Net webforms. I am attempting to add a new MVC application to the same web server in a separate virtual directory.
Since both applications are on the same machine, I expected a login in the main intranet site would apply its credentials to the MVC site. But that isn't the case. I have the .ADAuthCookie, but it isn't being accepted by the authentication controller. Both sites are using inproc sessions.
I'm not expecting any session variables to come through, since the sessions are inproc. But how can I get the intranet's auth cookie to work for the MVC application? Same server, different virtual directory, different application domains. Is this possible?
Site 1: webforms, .Net 2.0
Site 2: MVC, .Net 4.5
Upvotes: 0
Views: 900
Reputation: 48314
This is possible, since web cookies issued by the same web server should be accepted by both applications.
In your case the problem lies in the different versions of the .net framework. The cookie encryption algorithm has changed in .net 4 so that cookies issued by .net 2 are no longer recognized.
Try to set both sites to .net 4 if possible.
Upvotes: 1