2015-10-07 20 views
0

在Win Server 2008 R2上發佈兩個項目,一個是事實asp.net asp.net MVC和另一個。當用戶想在同一瀏覽器中同時使用這兩個應用程序時,輸入一個會話關閉另一個應用程序,我該如何共存這兩個應用程序? Webs.configs細節設置:衝突瀏覽器會話發佈兩個項目在同一個IIS中發佈ASP.NET和ASP.NET MVC

Web.config文件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文件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> 
+0

將兩個應用程序綁定到IIS中的不同URL:'domain.com/app1/home'和'domain.com/app2/home'。 http://stackoverflow.com/questions/9897890/can-one-iis-website-host-multiple-web-applications-of-different-asp-net-versions – Jasen

+0

爲每個項目中的表單標籤添加不同的名稱屬性值像這樣: and

回答

1

添加不同的名稱屬性值的形式標記在每個項目中,像這樣:

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

<forms loginUrl="validacion.aspx" timeout="300" name=".ASPXAUTHAPP2" /> 
+0

科菲有效地把名字,並嘗試在不同的瀏覽器,並沒有衝突。謝謝!!。 –

+0

很高興你確定。祝一切順利。 –