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 9025069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:10:51+00:00 2026-06-16T06:10:51+00:00

On the same IIS web site, I have two ASP.NET web applications called /foo

  • 0

On the same IIS web site, I have two ASP.NET web applications called /foo and /bar. Both use forms authentication and I want users to be able to log in and out of both sites independently.

With the standard configuration for forms authentication, it seems to send a cookie path of “/” for the forms auth cookie. This means that when a user logs into /bar it logs him out of /foo which is undesirable behaviour for me.

The obvious solution seems to be this:

FormsAuthentication.RedirectFromLoginPage(username, false, Request.ApplicationPath);

This makes the forms auth cookie have the application path which allows the user to log into /foo and /bar independently 🙂 However there is a further and more nasty problem: If the user tries to log into /Foo (with a capital F), IIS directs them to the web application /foo, but they can never log in because the browser (chrome in this case) is case sensitive when deciding whether to send the cookie based on the cookie path.

This seems to be a common problem which every ASP.NET web app developer will face but I can’t see a sensible solution for it. Please tell me i’ve missed something obvious?

Thanks

Andy

  • 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-16T06:10:53+00:00Added an answer on June 16, 2026 at 6:10 am

    I assume you have already solved this issue somehow, but since I stumbled upon this question I thought I should add my few cents.

    To solve the issue use different cookie names in web.config. Something like:

    <authentication mode="Forms">
      <forms name=".ASPXFORMSAUTH_FOO"
          loginUrl="public/login.aspx" cookieless="UseCookies" slidingExpiration="true"/>
    </authentication>
    

    and

    <authentication mode="Forms">
      <forms name=".ASPXFORMSAUTH_BAR"
          loginUrl="public/login.aspx" cookieless="UseCookies" slidingExpiration="true"/>
    </authentication>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My setup: ASP.NET 4.0 Web Site running on IIS 6.0. I have a site
I have an IIS website running an ASP.NET site but it has multiple applications
We're seeing an odd pattern in our QA Lab. We have two ASP.NET applications,
I have an asp.net (mvc) web site. As the part of the functions I
ASP.NET - IIS 6 - we currently have a public-facing site that has a
I have an ASP.NET web site that responds with multiple skins depending on the
I have an ASP.NET web app where I use an ado sql connection to
I have a solution file with two applications loaded. Both are MVC enabled apps,
We have two identical load balanced web servers (ws1 and ws2) serving the same
We have a huge ASP.NET web application which needs to be deployed to LIVE

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.