I've got two ASP.Net applications residing in two different folders on my server:
/Foo
<-- this is the standard unsecure application/Secure
<-- this is a separate application that requires SSL by IIS
The problem is that by default, the ASP.NET_SessionId
cookie is specified on the domain and is shared between the two applications in different directories. I need the session cookie to be different because I can't allow a hijacked cookie on /Foo
to be used to grant access to the /Secure
application.
Ideally, I would like each application's cookie to be limited by the cookie Path
property. There's apparently no way to do this in .Net out of the box.
As an added headache, even if I write custom code to set the cookie path, I'm fearful that some browsers are case sensitive and won't use the same session cookie for /Foo
and /foo
, which, depending on how the links are built, can result in multiple sessions in the same application.
Has anyone encountered and overcome this issue?