473,796 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpApplication .Session.Sessio nID Change on Each Request. Is it Normal?

Hi There!

I'm creating a HttpModule and after AcquireRequestS tate event, I tried to
access the HttpApplication .Session.Sessio nID 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 7661
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@nnnnnnnnnzz zzzzzzzzzzzzzzz zzzzz.zero> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi There!

I'm creating a HttpModule and after AcquireRequestS tate event, I tried to
access the HttpApplication .Session.Sessio nID 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 IRequireSession State?

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************ **@cybercomgrou p.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.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 IRequireSession State.

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.Session ID.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" <johnwsaundersi ii at hotmail.com> wrote in message
news:OU******** ******@TK2MSFTN GP09.phx.gbl...
"Mike Kline" <mk@nnnnnnnnnzz zzzzzzzzzzzzzzz zzzzz.zero> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi There!

I'm creating a HttpModule and after AcquireRequestS tate event, I tried to
access the HttpApplication .Session.Sessio nID 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 IRequireSession State?

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@nnnnnnnnnzz zzzzzzzzzzzzzzz zzzzz.zero> wrote in message
news:eW******** ******@TK2MSFTN GP12.phx.gbl...
No, my httpModule doesn't implement IRequireSession State.

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.Session ID.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" <johnwsaundersi ii at hotmail.com> wrote in message
news:OU******** ******@TK2MSFTN GP09.phx.gbl...
"Mike Kline" <mk@nnnnnnnnnzz zzzzzzzzzzzzzzz zzzzz.zero> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi There!

I'm creating a HttpModule and after AcquireRequestS tate event, I tried
to
access the HttpApplication .Session.Sessio nID 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 IRequireSession State?

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@nnnnnnnnnzz zzzzzzzzzzzzzzz zzzzz.zero> wrote in message
news:eW******** ******@TK2MSFTN GP12.phx.gbl...
No, my httpModule doesn't implement IRequireSession State.

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.Session ID.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
3352
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 Explicit and Response.Expires=-1,
10
7933
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 the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page requests and sessions.
4
8841
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: Session.Clear(); Session.Abandon(); FormsAuthentication.SignOut();
13
2861
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 visit again .... null ... again .... it works ..... again ... it works ... again ..... null....... and so on and on .... it does randomly work or not.... what is this effect?
13
3842
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 person, the other person's browser opens as if the sender logged in. 1) Person A Logins to the system. (login information is stored in SQL Session state) 2) Person A copy-paster the url and sends it to person B (format of the url is...
9
2548
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 they have "Always allow session cookies" set to true When the browser connects to the website the first page sets a session variable called "user_ref" to something and then calls another page. If on
13
9952
by: Goofy | last post by:
Does anyone know how I can kill a session by session ID ? -- Goofy
7
2967
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 have the same function in the Session_Begin and the Application events. I am capturing the Session beginning and the App begin and end but no Session end. My end goal is to capture some session objects before it dies and log it. Thanks,
3
5007
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 web.config: <authentication mode="Forms"> <forms name=".ReMaCRM" loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx" cookieless="AutoDetect" domain="" timeout="10" protection="All" /> </authentication>
0
9684
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10236
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7552
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.