473,396 Members | 1,924 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,396 software developers and data experts.

ASP.net session id changing on each request

I have working on WinXP + IIS 5.0 + .NET 1.1

Whenever i open a page with the url starting as http://localhost/<page
addressor http://127.0.0.1/<page addressthe application to hold session
values. Session id changes on each request. But when I try with the network
ip like http://10.10.10.10/<Page address(where 10.10.10.10 is localhost
itself) it works fine. session id remains same.

I am using session mode as InProc in web.config and my browsers always
accepts session cookies.

Can anyone please help me out to run with <localhost>.?

Samik
Jul 20 '06 #1
3 1854
Session is based on cookies sent by browser
For browser http://127.0.0.1 and http://10.10.10.10 are 2 different web
servers (even if they are physically same server).

Because of that cookies that were established with 127.0.0.1 are not sent to
10.10.10.10 and vise versa.
So I bet that in your situation there is a redirect from 127.0.0.1 to
10.10.10.10 at which point your session is lost.
George.

"samik" <sa***@discussions.microsoft.comwrote in message
news:A1**********************************@microsof t.com...
>I have working on WinXP + IIS 5.0 + .NET 1.1

Whenever i open a page with the url starting as http://localhost/<page
addressor http://127.0.0.1/<page addressthe application to hold
session
values. Session id changes on each request. But when I try with the
network
ip like http://10.10.10.10/<Page address(where 10.10.10.10 is localhost
itself) it works fine. session id remains same.

I am using session mode as InProc in web.config and my browsers always
accepts session cookies.

Can anyone please help me out to run with <localhost>.?

Samik

Jul 20 '06 #2
I am not redirecting from 127.0.0.1 to 10.10.10.10..

I was trying to access the same web once using localhost or 127.0.0.1 which
resulted insession loss

A different try using 10.10.10.10 which worked correctly

"George Ter-Saakov" wrote:
Session is based on cookies sent by browser
For browser http://127.0.0.1 and http://10.10.10.10 are 2 different web
servers (even if they are physically same server).

Because of that cookies that were established with 127.0.0.1 are not sent to
10.10.10.10 and vise versa.
So I bet that in your situation there is a redirect from 127.0.0.1 to
10.10.10.10 at which point your session is lost.
George.

"samik" <sa***@discussions.microsoft.comwrote in message
news:A1**********************************@microsof t.com...
I have working on WinXP + IIS 5.0 + .NET 1.1

Whenever i open a page with the url starting as http://localhost/<page
addressor http://127.0.0.1/<page addressthe application to hold
session
values. Session id changes on each request. But when I try with the
network
ip like http://10.10.10.10/<Page address(where 10.10.10.10 is localhost
itself) it works fine. session id remains same.

I am using session mode as InProc in web.config and my browsers always
accepts session cookies.

Can anyone please help me out to run with <localhost>.?

Samik


Jul 20 '06 #3
I can not come up with any other reason.
You can download fiddler from http://www.fiddlertool.com
and investigate header information.
But keep in mind that Session will be lost if you are changing server name.
Even www.mysite.com and mysite.com considered as 2 different sever names
(actually depends on a browser version).

George
"samik" <sa***@discussions.microsoft.comwrote in message
news:B3**********************************@microsof t.com...
>I am not redirecting from 127.0.0.1 to 10.10.10.10..

I was trying to access the same web once using localhost or 127.0.0.1
which
resulted insession loss

A different try using 10.10.10.10 which worked correctly

"George Ter-Saakov" wrote:
>Session is based on cookies sent by browser
For browser http://127.0.0.1 and http://10.10.10.10 are 2 different web
servers (even if they are physically same server).

Because of that cookies that were established with 127.0.0.1 are not sent
to
10.10.10.10 and vise versa.
So I bet that in your situation there is a redirect from 127.0.0.1 to
10.10.10.10 at which point your session is lost.
George.

"samik" <sa***@discussions.microsoft.comwrote in message
news:A1**********************************@microso ft.com...
>I have working on WinXP + IIS 5.0 + .NET 1.1

Whenever i open a page with the url starting as http://localhost/<page
addressor http://127.0.0.1/<page addressthe application to hold
session
values. Session id changes on each request. But when I try with the
network
ip like http://10.10.10.10/<Page address(where 10.10.10.10 is
localhost
itself) it works fine. session id remains same.

I am using session mode as InProc in web.config and my browsers always
accepts session cookies.

Can anyone please help me out to run with <localhost>.?

Samik



Jul 21 '06 #4

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

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
9
by: bajopalabra | last post by:
hi session("myVar") = rs.getRows( ) don't work when number of records is greater than 10 does anybody know WHY ??? is it a Session object limitation ??? thanks
8
by: Ben | last post by:
Hi there I am writing a C# application that is making multiple POST requests to an ASP.NET page. I would like to take advantage of ASP.NET sessions to store some data on the server side. Where do...
1
by: Werner | last post by:
Hi Patrick! Can you give an example of how to use a frameset inside an aspx-file? When I create a new frameset in Visual Studio.Net it just gives me a htm-File. Or give me a link where I can...
1
by: Kevin Jackson | last post by:
Does accessing a session variable multiple times during the processing of a page incur a hop each time it is accessed in State Server and SQL Server modes? Or does the roundtrip occur just once...
4
by: Aidas Pasilis | last post by:
I'm saving some values to the Session state and get some strange results. To be short I'll write example code and standart behavior: Code Example:...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
5
by: Ed | last post by:
I have some questions in regards to Session variables and IIS Recycling: 1. Does the IIS setting 'Shutdown worker process after being idle' affect an application's session variables? Or is IIS...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.