REPOST: ASP.NET Returns a New Session ID For Each Request

E

Edward Yang

I find I have to repost one of my old posts again. I'm having the problem
again here.

<cite>

This does not happen frequently, but does happen in rare unkown cases.

For example, at the time I'm writing this post, I'm having this problem
again.

The test page I'm browsing simply displays the SessionID. Each time I
refresh the page, the SessionID gets a new value!!!

The result is that Session state is totally lost when in InProc mode! In
StateServer mode, it simply says that the data cannot be serialized.

Hope Microsoft will hear my voice.

Thanks.

</cite>

More:

I have both v1.0 and v1.1 framework installed. Since v1.1 was installed
later than v1.0, all application mappings in IIS are mapped to v1.1 runtime.
 
A

AW

1. check that the cookies are not disabled in your browser
2. try to change the session mode to cookieless="true" in your web.config.

For the error related with using StateServer, check that you aren't placin
in the Session something that isn't serializable. For example, the objects
that you create from you own written classes are not serializable by
default, you need to place the [Serializable] attribute in front of them.
 
N

Natty Gur

Hi,

In addition to AW replay,

Check with performance monitor -> ASP.NET object -> Application restart
counter for the number of application restart. If the value is high your
application is restarting and thus session ID changed. There are many
causes for application recycling. The most common one is change that
made to the Bin directory (your code is writing to) and changes to
web.config that might be cause by anti-virus system.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 

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

Top