I have got two asp.net applications (.NET 4.5) on the same application pool on the same IIS (7.5). Their authentication tables are from two different databases. My problem is that when I log into one application, I get logged into the other as well (even if the other application doesn't have the same user id).
Clearly, the two applications are sharing the same session. I have updated the Web.config file in each of the applications as follow:
<sessionState
cookieName="some_unique_name"
timeout="30">
</sessionState>
<membership defaultProvider="SqlProvider">
<providers>
<clear/>
<add
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="AuthCorporate"
applicationName="some_unique_name"/>
</providers>
</membership>
It may have to do with configuring Identity and Authentication. My ConfigureAuth() in Startup.Auth.cs looks like this:
public void ConfigureAuth(IAppBuilder app)
{
// Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
}
What am I missing to make these two applications have their own separate sessions? Thanks in advance.
Nay