Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7785523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:16:11+00:00 2026-06-01T20:16:11+00:00

I have an Asp.Net MVC application using Forms Authentication that is published to the

  • 0

I have an Asp.Net MVC application using Forms Authentication that is published to the same IIS Web Site under different Application Names:

Default Web Site/Dashboard
Default Web Site/Partner

Using Chrome, if I go to the Dashboard instance and log in, everything seems to work fine. If I open a separate browser window and navigate to the Partner instance, I am prompted to log in as expected. Upon logging into Partner instance, everything seems to work fine as well. The problem arises when I go back to my previous browser window and try to access an authenticated resource on the Dashboard instance, where I get redirected to the Login page as if I had somehow been logged out. If I log in again on the Dashboard instance, thing work fine again. But if I go to the Partner instance, I discover that I get logged out there. It seems that the act of logging into the other application instance somehow logs me out of the previous one. I did some goggling and it appears the problem is caused by my forms authentication cookie settings. Here is what I was using:

<authentication mode="Forms">
  <forms loginUrl="~/Account/LogOn"
         timeout="1576800"/>
</authentication>

I did not specify a cookie path explicitly, so I figured the cookie path might be shared by the application instances so it was getting overwritten. So I tried to specify a cookie path explicitly. So when I publish Dashboard, I used this:

 <authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn"
             timeout="1576800"
             cookieless="UseCookies"
             path="/Dashboard" />
 </authentication>

And for Partner, I used this:

 <authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn"
             timeout="1576800"
             cookieless="UseCookies"
             path="/Partner" />
 </authentication>

However this did not work at all. With these settings I can not even log in and out properly. My goal is to have the Dashboard and Partner instances be totally independent for forms authentication, so logging into one does not influence the other. Is this possible without putting them in different IIS Web Site names?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:16:12+00:00Added an answer on June 1, 2026 at 8:16 pm

    In the web.config for each application, set unique name for the cookie name in your authentication tags

     <authentication name="DashBoard" mode="Forms">
     <forms loginUrl="~/Account/LogOn" />
    </authentication>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application built in asp.net mvc using forms authentication. I am
I have an ASP.Net MVC web application using forms authentication. I am using OpenID
I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server.
I have an existing asp.net mvc website that uses basic forms authentication. The site
I am using forms authentication with ASP.NET MVC. Within web.config at application level I
I have an ASP.NET MVC application using forms authentication. Here's the line of code
I have an ASP.Net Web Forms application in which I'm using forms-based authentication with
I am using asp.net MVC to develop an application that will have ajax interactions.
I'm trying to setup Forms Authentication in an asp.net mvc 2 application that will
I have a pretty big web application that I created last year using ASP.NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.