RE: Won't save session object

From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 02/18/04


Date: Wed, 18 Feb 2004 02:48:13 GMT

Hi Scott,

Thanks for posting in the community!
>From your description, you found your web application's sessionstate not
work when it is visited by some certain workstation client side on your
side,yes?
If there is anything I misunderstood, please feel free to let me know.

As for the problem you mentioned, I think Marina's suggesion is quite
informative, as he mentioned that this problem is likely due to those
client machine's cookie setting.

In fact, the ASP.NET's session is by default associated with all the client
machine via cookie variable named "ASP.NET_SessionId" which identitfy the
unique session id of the certain user. If the client machien has disabled
the cookie in its browser, that'll cause the client unable to associate its
sessionstate on the serverside, then we'll found the session not work. So
would you please try checking the client's browser to see whether the
cookie has been disabled?
You can check in the Browser's setting. In IE, you can find the setting in
the tools-->interntet options-->privacy setting panel and see whether
you've block the certain site's cookie

Also, another means to detect the cookie is to write some code in a certain
ASP.NET page to write a certain cookie variable and then retrieve back it ,
for example:
if(!IsPostBack)
{
        Response.Cookies.Add(new HttpCookie(...));
}
else
{
        //get the certain cookie via Request.Cookies[...].Value;
}

If unable to retrieve the cookie from clientside again, there must be
something incorrect with the client's cookie setting.

In addtion, here are some tech artielcs on ASP.NET session and cookie
implementation:

#Underpinnings of the Session State Implementation in ASP.NET
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnetsessionstate.asp?f
rame=true

#basics of cookies in asp.net
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechar
t/html/vbtchaspnetcookies101.asp

#Enabling Cookieless Session State in ASP.NET
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030318ASPNET
RH/manifest.xml

http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=401

Hope they're helpful.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx



Relevant Pages

  • Re: Do IIS applications "go to sleep"?
    ... client side. ... This type of cookie is not disabled when one disables client ... using these session items. ... need your timer when you extend a session timeout to five days. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Do some operation just before sending response header
    ... If I want to change PHP session mechanism to store session data into ... you are allowing the client unrestricted access to modify the ... creating a cookie first) but it's a really bad idea to push the ... is it possible to hook before sending response header? ...
    (comp.lang.php)
  • Re: Hiding variables passed via URL
    ... unique session ID. ... That has to be carried by a cookie or by a URL. ... session ID as a URL than as a cookie. ... on a file on the server the client is communicating with. ...
    (comp.lang.php)
  • Re: WebService session sessionstate SOAP
    ... InfoPath as a client doesn't respect the session cookie. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: WebService session sessionstate SOAP
    ... InfoPath as a client doesn't respect the session cookie. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)

Loading