473,396 Members | 1,784 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.

IIS7 - New session id with every request

7
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>


And session state is configured in IIS as
In Process
Use Cookies
Time out = 10 minutes
Use hosting identity for impersonation


I have run a trace for both IE7 and Firefox 3, and the results are a bit different, hopefully this will highlight some clues. I have run a quick test, I have a page that shows a list of products
in a gridview, then the user would select a couple, hit a button and see those products selected in a details page. The products are stored in session so the details page knows which ones were selected.
The obvious things I notice are:

- In IE, the session id changes with each request whicle in Firefox stays the same (this is good) hence the IsNew value for IE is true while Firefox keeps it false (same session).

- In IE the request cookies remain empty, while in Firefox I can see the cookie I specified in web.config (MyCookie)

- However Firefox has empty Response cookies, while IE stores some values. This however is not stopping Firefox from workimng fine.

-PRODUCTLIST is a session variable that remains empty in IE while Firefox shows the products selected

- IE is adding a lot of crap to the url while Firefox keeps it clean.



Any ideas highly appreciated, this is getting desperate. EnableSessionState is true (default). Everything works fine in Windows Server 2003 and IIS6.


Thanks


IE7, PRODUCTS LIST
************************************************** *************************
Request Details
Session Id: 5ndmre45eef30w5513xwla55

PRODUCTLIST=---
COOKIELESS=False
ISNEW=True
MODE=InProc
SESSIONID=5ndmre45eef30w5513xwla55
TIMEOUT=10
COOKIEMODE=UseCookies

Request Cookies Collection
<Empty>

Response Cookies Collection
ASP.NET_SessionId 5ndmre45eef30w5513xwla55 42
CurrLanguage 6

Headers Collection
Connection Keep-Alive
Referer http://mywebsite/(X(1)F(-ewRO3icZtByyRBJbZuhOnOj_5Se-UBrWkMnJzOElOK71P6hfWDg60I7jFOlafyb9-khfm76UqZNxNttnb9DpN-m-84_3-r3TlSJgEFxiPw1))/Default.aspx
User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; InfoPath.2)
UA-CPU x86
AspFilterSessionId X(1)F(-ewRO3icZtByyRBJbZuhOnOj_5Se-UBrWkMnJzOElOK71P6hfWDg60I7jFOlafyb9-khfm76UqZNxNttnb9DpN-m-84_3-r3TlSJgEFxiPw1)

Response Headers Collection
X-AspNet-Version 2.0.50727
Set-Cookie ASP.NET_SessionId=5ndmre45eef30w5513xwla55; path=/; HttpOnly
Set-Cookie CurrLanguage=6; expires=Tue, 30-Jun-2009 15:33:09 GMT; path=/
Cache-Control private
Content-Type text/html

IE, SHOWS 2 PRODUCTS SELECTED FORM LIST
************************************************** *************************

Request Details
Session Id: si20jp45n3bvc0zd33vgwpub

PRODUCTLIST=---
COOKIELESS=False
ISNEW=True
MODE=InProc
SESSIONID=si20jp45n3bvc0zd33vgwpub
TIMEOUT=10
COOKIEMODE=UseCookies

Request Cookies Collection
<Empty>

Response Cookies Collection
ASP.NET_SessionId si20jp45n3bvc0zd33vgwpub
CurrLanguage 6

Headers Collection
Cache-Control no-cache
Connection Keep-Alive
Referer http://mywebsite/(X(1)F(-ewRO3icZtByyRBJbZuhOnOj_5Se-UBrWkMnJzOElOK71P6hfWDg60I7jFOlafyb9-khfm76UqZNxNttnb9DpN-m-84_3-r3TlSJgEFxiPw1))/Products.aspx
User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; InfoPath.2)
UA-CPU x86
AspFilterSessionId X(1)F(-ewRO3icZtByyRBJbZuhOnOj_5Se-UBrWkMnJzOElOK71P6hfWDg60I7jFOlafyb9-khfm76UqZNxNttnb9DpN-m-84_3-r3TlSJgEFxiPw1)

Response Headers Collection
X-AspNet-Version 2.0.50727
Set-Cookie ASP.NET_SessionId=si20jp45n3bvc0zd33vgwpub; path=/; HttpOnly
Set-Cookie CurrLanguage=6; expires=Tue, 30-Jun-2009 15:37:03 GMT; path=/
Cache-Control private
Content-Type text/html


************************************************** *************************
************************************************** *************************
************************************************** *************************


Firefox, PRODUCTS LIST
************************************************** *************************

Request Details
Session Id: 5isfv345keniqw32m1py3t3z

PRODUCTLIST=---
COOKIELESS=False
ISNEW=False
MODE=InProc
SESSIONID=5isfv345keniqw32m1py3t3z
TIMEOUT=10
COOKIEMODE=UseCookies


Request Cookies Collection
CurrLanguage 6
ASP.NET_SessionId 5isfv345keniqw32m1py3t3z
MyCookie CFFBB3756BC404FD9771FA01D15856445B6843DAC2476551D4 9850F34648A2D99860BB5FC0259E0848F23EDBB64F3FAA91EA 8E3ABB0A63B1E9F10CF5B27A3A232BEFA8EDEE0D16B0289B27 46F52C4DF0 169

Response Cookies Collection
<Empty>

Headers Collection
Connection keep-alive
Keep-Alive 300
Cookie CurrLanguage=6; ASP.NET_SessionId=5isfv345keniqw32m1py3t3z; .MyCookie=CFFBB3756BC404FD9771FA01D15856445B6843DA C2476551D49850F34648A2D99860BB5FC0259E0848F23EDBB6 4F3FAA91EA8E3ABB0A63B1E9F10CF5B27A3A232BEFA8EDEE0D 16B0289B2746F52C4DF0
Referer http://mywebsite/ProductDetails.aspx
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

Response Headers Collection
X-AspNet-Version 2.0.50727
Cache-Control private
Content-Type text/htm


Firefox, SHOWS 2 PRODUCTS SELECTED FORM LIST
************************************************** *************************
Request Details
Session Id: 5isfv345keniqw32m1py3t3z

PRODUCTLIST=43808,43794
COOKIELESS=False
ISNEW=False
MODE=InProc
SESSIONID=5isfv345keniqw32m1py3t3z
TIMEOUT=10
COOKIEMODE=UseCookies

Request Cookies Collection
CurrLanguage 6
ASP.NET_SessionId 5isfv345keniqw32m1py3t3z
.MyCookie CFFBB3756BC404FD9771FA01D15856445B6843DAC2476551D4 9850F34648A2D99860BB5FC0259E0848F23EDBB64F3FAA91EA 8E3ABB0A63B1E9F10CF5B27A3A232BEFA8EDEE0D16B0289B27 46F52C4DF0 169

Response Cookies Collection
<Empty>

Headers Collection
Connection keep-alive
Keep-Alive 300
Cookie CurrLanguage=6; ASP.NET_SessionId=5isfv345keniqw32m1py3t3z; .ReMaCRM=CFFBB3756BC404FD9771FA01D15856445B6843DAC 2476551D49850F34648A2D99860BB5FC0259E0848F23EDBB64 F3FAA91EA8E3ABB0A63B1E9F10CF5B27A3A232BEFA8EDEE0D1 6B0289B2746F52C4DF0
Referer http://mywebsite/Products.aspx
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

Response Headers Collection
X-AspNet-Version 2.0.50727
Cache-Control private
Content-Type text/html
Jul 1 '08 #1
3 4964
Plater
7,872 Expert 4TB
IE is blocking your session cookie
Jul 1 '08 #2
dihola
7
IE is blocking your session cookie
Hi,
yeah I believe so but why? I have reduced the security levels to a minimum and the browser has no problems accepting cookies from other sites. In fact it accepts cookies from my same website when hosted in a Windows Server 2003 with II6.
Thanks
Jul 1 '08 #3
dihola
7
Hi,

I have resolved the problem. The reason why it wasn't working is, deep breath, because my website's url contained an underscore character (ie http://my_website).

I have changed the name and now it all works fine. I can not believe how STUPID this is. Thanks IE for another nice "feature". And well done Safari for copying such functionality. Firefox and Opera, you still remain favourites.
Jul 4 '08 #4

Sign in to post your reply or Sign up for a free account.

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...
2
by: Jeff S | last post by:
No question here; just information that anyone running ZoneAlarm on a development machine may find useful as you develop your ASP.NET apps - (or for those of you who are assisting users who may be...
8
by: ari | last post by:
hey all, i'm trying to make my app as stateless as possible. is it ok to create a dataset and store in viewstate and whenever the user decides to select a from that dataset, to move from...
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...
3
by: Brad | last post by:
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing IIS7....but it works just fine in visual studio's cassini web server. And if I create a web form and use the crystal...
8
by: Darwiniv | last post by:
1. Does anyone run ASAPI and mysql succesfully on Vista /IIS7? 2. Does anyone run CGI and display all SESSION errors on Vista /IIS7? php ASAPI doesn't works with MYSQL. And CGI doesn't show...
6
by: ma | last post by:
Hello, I am new to IIS and ASP.NET. I wrote my first ASP.NET and I want to deploy in to a system which has Vista Business and IIS7. I copied my files to the target computer and created a virtual...
11
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hello, I have just installed VISTA Enterprise and VS.NET 2008. When pressing F5 to debug my test ASP.NET website, IE 7 display the message "Internet Explorer cannot display the webpage". The...
10
by: Kal | last post by:
I recently installed Windows 2008 Server to replace a crashed hard drive on a web server with a variety of web pages including several classic ASP applications. One of these makes extensive use of...
7
by: David Thielen | last post by:
Hi; How do I set how long until IIS 7 drops a session for an ASP.NET 2.0 web app? I want to set it for 8 hours. thanks - dave david@at-at-at@windward.dot.dot.net Windward Reports --...
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?
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
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
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...
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.