473,795 Members | 3,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1866
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***@discussi ons.microsoft.c omwrote in message
news:A1******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c omwrote in message
news:A1******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c omwrote in message
news:B3******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c omwrote in message
news:A1******* *************** ************@mi crosoft.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
7131
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 a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
9
3663
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
3837
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 I get my session id when I first hit the ASP page and how do I pass it back to the page so that ASP will recognize it Thanks Ben
1
737
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 find one? Thanks Werner P.S. Somehow I did not manage to do a followup in Googles newsgroups.
1
955
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 and then the variable used from a session cache for the rest of the request? Is the session written out at the end of the request or when a session is written to?
4
15257
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: ///////////////////////////////////////////////////////////////////////////////////////// private void WriteToSessionButton_Click(object sender, , System.EventArgs e) { Session = "My value";
9
5317
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 copy paste (I hear this will improve in ASP.Net 2 via master pages). When I navigate from one page to the next the header and footer user controls lose their state because they are effectively different instances of the user control. Is there...
5
3186
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 checking that all sessions are done before shutting down the worker processes? 2. Does the Recycle worker processes setting kill all session variables of
43
3440
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
9672
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
10435
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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...
0
9037
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
7538
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
6779
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
5436
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...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.