当前位置: 动力学知识库 > 问答 > 编程问答 >

Conflict browser session to publish two projects ASP.NET and ASP.NET MVC in the same IIS

问题描述:

Publish an IIS on a Win Server 2008 R2 two projects, a fact asp.net asp.net MVC and another. When the user wants to work with both applications at the same time in the same browser, entering one session closes the other application, how can I do to coexist both ?. Webs.configs detail settings:

Web.Config in ASP.NET MVC:

<authentication mode="Forms">

<forms loginUrl="~/Cuenta/Ingresar" timeout="2880" />

</authentication>

...

<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="300">

<providers>

<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />

</providers>

</sessionState>

Web.Config in ASP.NET:

<sessionState mode="InProc" customProvider="sesionSU" timeout="600">

<providers>

<add name="sesionSU" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />

</providers>

</sessionState>

...

<authentication mode="Forms">

<forms loginUrl="validacion.aspx" timeout="300" />

</authentication>

<authorization>

<deny users="?" />

</authorization>

网友答案:

Add different name attribute values to the forms tag in each project like so:

<forms loginUrl="~/Cuenta/Ingresar" timeout="2880" name=".ASPXAUTHAPP1" />

and

<forms loginUrl="validacion.aspx" timeout="300" name=".ASPXAUTHAPP2" />
分享给朋友:
您可能感兴趣的文章:
随机阅读: