Forum Moderators: open

Message Too Old, No Replies

ASP setting a cookie in HTTP header

can I cancel it?....

         

SuzyUK

3:09 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been doing some homework on HTTP headers and have discovered how that my site is automatically setting a huge long cookie for each session

I don't need it, (I don't think) as I'm not using session variables (yet) can I get rid of it and if so (In laymans terms please!) How?

I've found out how to add headers in asp but can't find out how to remove one that I'm not setting

any advice on headers welcome

Thanks
Suzy

Dreamquick

3:34 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you mean ASPSESSIONID[random gunk]=[random gunk] then that's the session cookie...

To disable session management there are two routes; they are covered in KB article Q244465 which you can look up on the msdn.microsoft.com site.

By the sound of it the "code only" method isn't what you want as it only disables server-side session management rather than actually stopping the session cookie being sent out (Haven't had a chance to try it yet so not certain).

But to give you the quick summary;

Method 1 - Server Configuration
Open the Internet Information Services Manager, right-click your Web application and click Properties.

On the "Directory Properties" tab, click the "Configuration" button - from here select the "App Options" tab, untick the "Enable Session State" box.

Method 2 - Script Command
Disable session state for a specific ASP page by adding the following directive at the top of the ASP page:

<%@ EnableSessionState=False %>

- Tony

SuzyUK

5:35 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi dreamquick

that's the one, but I've discovered I have to keep it as I use Session.LCID

Thanks for pointer though, It's just so long in the logs!

Suzy

Dreamquick

7:11 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If thats the only reason the Response object also has what appears to be a .LCID property under the newer IIS versions.

- Tony