473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

HttpApplication.Session.SessionID Change on Each Request. Is it Normal?

Hi There!

I'm creating a HttpModule and after AcquireRequestState event, I tried to
access the HttpApplication.Session.SessionID and somehow I'm getting a new
value on every Refersh of ASPX page.

I thought SessionID is supposed to stay static until the session timeout
defined in the web.config. Or am I missing something here???

Thanks!!

MK

Nov 19 '05 #1
6 7645
It sounds like the browser doesn't accept the session cookie. When the
server doesn't "see" an ASP-session cookie, it creates a new session.
Check your browser security settings.

Nov 19 '05 #2
"Mike Kline" <mk@nnnnnnnnnzzzzzzzzzzzzzzzzzzzzzz.zero> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi There!

I'm creating a HttpModule and after AcquireRequestState event, I tried to
access the HttpApplication.Session.SessionID and somehow I'm getting a new
value on every Refersh of ASPX page.

I thought SessionID is supposed to stay static until the session timeout
defined in the web.config. Or am I missing something here???


Does your HttpModule implement IRequireSessionState?

I've seen this happen for pages which refer to SessionID but which do not
read or set Session.

John Saunders
Nov 19 '05 #3
Hi JoakimR,

Thanks for the reply! I've checked my IE setting and it is in the level of
"Accept All Cookies".

Any other ideas?

Cheers,
MK

"JoakimR" <jo**************@cybercomgroup.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
It sounds like the browser doesn't accept the session cookie. When the
server doesn't "see" an ASP-session cookie, it creates a new session.
Check your browser security settings.

Nov 19 '05 #4
No, my httpModule doesn't implement IRequireSessionState.

The more I test it, the more I think it is not the problem with my
httpModule. Because at last, here's how I tested for the SessionID using a
normal ASPX page.

Sub Page_Load()
Response.Write(Session.SessionID.ToString())
End Sub

and everytime I refresh it, I get a new value! In the web.config file I have
<sessionState timeout="20" /> and still generating new SessionID on each
refresh.

The strange thing is that I have about 5 ASP.NET web sites currently running
and I tested on all of those websites. The result is surprisingly the Same!
How could a new SessionID be generated on each refresh????

I am absolutely hitting my head against the wall! Help!

MK

"John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
"Mike Kline" <mk@nnnnnnnnnzzzzzzzzzzzzzzzzzzzzzz.zero> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi There!

I'm creating a HttpModule and after AcquireRequestState event, I tried to
access the HttpApplication.Session.SessionID and somehow I'm getting a
new
value on every Refersh of ASPX page.

I thought SessionID is supposed to stay static until the session timeout
defined in the web.config. Or am I missing something here???


Does your HttpModule implement IRequireSessionState?

I've seen this happen for pages which refer to SessionID but which do not
read or set Session.

John Saunders

Nov 19 '05 #5
Just an update...

My server is Windows 2000. And my server names doesn't contains any
"illegal" characters such as _ (underscore).

help......

MK

"Mike Kline" <mk@nnnnnnnnnzzzzzzzzzzzzzzzzzzzzzz.zero> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
No, my httpModule doesn't implement IRequireSessionState.

The more I test it, the more I think it is not the problem with my
httpModule. Because at last, here's how I tested for the SessionID using a
normal ASPX page.

Sub Page_Load()
Response.Write(Session.SessionID.ToString())
End Sub

and everytime I refresh it, I get a new value! In the web.config file I
have <sessionState timeout="20" /> and still generating new SessionID on
each refresh.

The strange thing is that I have about 5 ASP.NET web sites currently
running and I tested on all of those websites. The result is surprisingly
the Same! How could a new SessionID be generated on each refresh????

I am absolutely hitting my head against the wall! Help!

MK

"John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
"Mike Kline" <mk@nnnnnnnnnzzzzzzzzzzzzzzzzzzzzzz.zero> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi There!

I'm creating a HttpModule and after AcquireRequestState event, I tried
to
access the HttpApplication.Session.SessionID and somehow I'm getting a
new
value on every Refersh of ASPX page.

I thought SessionID is supposed to stay static until the session timeout
defined in the web.config. Or am I missing something here???


Does your HttpModule implement IRequireSessionState?

I've seen this happen for pages which refer to SessionID but which do not
read or set Session.

John Saunders


Nov 19 '05 #6
"Mike Kline" <mk@nnnnnnnnnzzzzzzzzzzzzzzzzzzzzzz.zero> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
No, my httpModule doesn't implement IRequireSessionState.

The more I test it, the more I think it is not the problem with my
httpModule. Because at last, here's how I tested for the SessionID using a
normal ASPX page.

Sub Page_Load() Session("foo") = "bar" Response.Write(Session.SessionID.ToString())
End Sub

Try putting something into Session state before checking SessionID.

John Saunders
Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: doltharz | last post by:
Please Help me i'm doing something i though was to be REALLY EASY but it drives me crazy The complete code is at the end of the email (i mean newsgroup article), i always use Option...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
4
by: Andy Fish | last post by:
Hi, I have an asp.net application that is using Forms Authentication and maintaining http session state using cookies in the normal way. when the user clicks the logout button I do this: ...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
13
by: Hope Paka | last post by:
I am storing user login information (not password) in the session. I also use, cookieless session. I realized that, if someone copy-pastes the URL after he/she logged in to the system to another...
9
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings...
13
by: Goofy | last post by:
Does anyone know how I can kill a session by session ID ? -- Goofy
7
by: David Lozzi | last post by:
Howdy, I'm trying to capture the session end event. I put a spot of code in the Session_End event in the Global.asax.vb file. The function simply writes to a database table logging the event. I...
3
by: dihola | last post by:
Hi, I have a website running in IIS7 and it seems to be creating a new session for every request I make. The values I store in Session are lost with every request. This is the forms bit in my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.