开发者

Re-login of several ASP.NET MVC apps on the same server

开发者 https://www.devze.com 2023-03-29 23:30 出处:网络
I have several ASP.NET MVC 3 apps running on IIS 6 with separate app pools under different virtual directories:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消