Re: Relationship between IIS Sessions and ASP.NET Sessions?

  • Thread starter Ken Cox [Microsoft MVP]
  • Start date
K

Ken Cox [Microsoft MVP]

It seems to me that sessions are part of ASP and ASP.NET and that they just use
IIS as a vehicle for fetching and sending the memory-based cookie that helps
implement sessions.

That said, ASP sessions are isolated from ASP.NET sessions but I've seen some
references to ways of letting them reach out to each other.

Ken

I couldn't find specific information in the documentation, but some
experimenting has lead me to believe that one may disbaled Sessions in IIS
and still be able to maintain default-style sessions in ASP.NET. This leads
me to believe that ASP.NET's session handling is completely isolated from
IIS Sessions. Is this true? Are there any documents that discuss this in
detail?
 
L

Luther Miller

Ken,

I did some testing after I posted this message. I set my IE settings
for cookies to Always Prompt (even session cookies) to see what was
going on. I disabled sessions in IIS completely and then launched an
ASP.NET application that uses sessions. It saved a cookie with ASP_NET
in the name (or was it ASPNET - I don't remember exactly), but it was
NOT IIS's session cookie name. Also, the ASP.NET application's
sessions continued to work fine. This all came up because we noticed
that upping IIS's session timeout had no effect on the ASP.NET
application - but upping it in the web.config did work.

Of course, when I turned IIS sessions back on, I didn't get any new
cookies that were the usual IIS/ASP cookie, and I have no explanation
for that.

In any case, the conclusion I draw is that ASP.NET's session
management is completely independent of IIS altogether - it sets its
own cookies, uses its own storage mechanisms, etc. (I've read that you
can restart IIS and not lose ASP.NET session data, but I haven't tried
this.)

I'd like to find this confirmed somewhere, though.

Cheers,
Luther
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top