Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent IIS7 from dropping my cookies?

I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with IIS7 as the web server. I've got a problem where my cookies aren't "sticking" to the session, so I had a Google and found that there was a known issue with duplicate response headers overwriting instead of being added to the session. This problem was, however, supposed to have been fixed in Service Pack 1 for Vista.

Any ideas as to what my trouble might be?


I'm using an Integrated app pool, and the max number of worker processes == 1.

What's the significance of the underscore? Does it matter where in the URL it is (e.g. it matters if it's in the host name, but not if it's in the query string)?

like image 275
Lucas Wilson-Richter Avatar asked Aug 13 '08 01:08

Lucas Wilson-Richter


People also ask

How do I enable cookies on IIS?

Open IIS Manager and navigate to the level you want to manage. In Features View, double-click Session State. On the Session State page, in the Cookie Settings area, select Use Cookies from the Mode drop-down list. Type a cookie name in the Name text box, or use the default cookie name, ASP.

How do I disable cookies in IIS?

In IIS, go to the Home Directory tab, then click the "Configuration" button. Next go to the Options tab and un-check "Enable session state". The cookie will go away, and you can leave your files where they are with no need for an extra domain or sub-doamin.

What is IIS session state?

Session state is a means by which Internet Information Services (IIS) 7 stores information about each unique client session. For example, if your Web site has a shopping cart application, the contents of each client's shopping cart can be stored in session state.


1 Answers

Just a thought, have you got an underscore in the url. e.g. http://my_site ?

And one other thing, you're not running the app pool in web garden mode? i.e. Process Model -> Maximum Worker Processes: > 1

What type of app pool are you using - Integrated or Classic mode ?

like image 118
Kev Avatar answered Oct 16 '22 23:10

Kev