I have several ASP.NET MVC 3 apps running on IIS 6 with separate app pools under different virtual directories:
http://192.168.1.2/theapp
http://192.168.1.2/otherapp
All uses forms authentication.
The problem is that whenever I log in to one application, the other applications get logged开发者_C百科 out.
I have set up machine keys for each apps, all different.
What else did I miss so I can log in to all apps?
Please check what is the path defined for the Forms Authentication. If it is set to root, both applications conflict with each other.
Try setting something like that in web.config (notice the path
attribute):
<forms loginUrl="~/admin/AdminLogin.aspx" timeout="20" path="/theapp">
</forms>
See: http://msdn.microsoft.com/en-us/library/ff647070.aspx and note the Path explanation.
精彩评论