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

  • SEARCH
  • Home
  • 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 364791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:28:20+00:00 2026-05-12T13:28:20+00:00

I am writing a .NET application that uses cookies to store a login token.

  • 0

I am writing a .NET application that uses cookies to store a login token. I’d like the user to be able to log into multiple installations of this application on the same server (let’s say jacob.local/Devel and jacob.local/Stable), so I want to set the Path property for the cookies appropriately. Currently I’m using Request.ApplicationPath but am running into trouble when the user visits the site with a different case than what I’ve set up in IIS.

For example, the user visits jacob.local/stable — the cookie’s path will be /Stable, which the browser doesn’t send back to me since it can’t know that IIS is case insensitive.

Do I have to parse apart the whole query string myself, or is there already a function for figuring out what the path of the application is?

  • 1 1 Answer
  • 1 View
  • 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-05-12T13:28:21+00:00Added an answer on May 12, 2026 at 1:28 pm

    The following trick grabs the application path with casing matched to the one specified in the URL of the current request.

    Request.Url.AbsolutePath.Remove(Request.ApplicationPath.Length)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an ASP.net application that uses Windows Identity Foundation. My ASP.net application uses
I am writing a Asp.net MVC 2 application that uses Forms Authentication and currently
I am writing an ASP.Net MVC application that uses NTLM authentication, so users don't
I'm writing a C# (ActiveX) plugin for an application that uses SetCompatibleTextRenderingDefault(true) (forces .net
I am writing a .NET WinForms application that needs to display a list of
I'm writing a small .NET application that can produce SWF files, and I need
I'm writing a .NET command-line application that will migrate users from an existing database
I'm writing an .NET 3.5 web application that is using LinqToSql for the basic
I am writing a web application on Asp.Net MVC 3. Assume that we have
In the ASP.Net application I am writing I need to be able to have

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.