Re: Won't save session object

From: Schoo (scott.schuman_at_nospam.ma-hc.com)
Date: 02/18/04


Date: Wed, 18 Feb 2004 16:25:37 -0600

I am going to read the links you provided on session state and cookies and
develop a test application which may take me a few days to finish (I have
other projects pending), but I wanted to add these comments and get the
group's input:

Marina and Cheng both commented that the workstations need to have cookies
enabled. The symptoms of the issue don't support that as a problem and here
is why: When I am sitting at the test server and run the program with the
URL: http://localhost/program.aspx it runs the session objects fine, but if
I use http://>/program.aspx it will not store state. Also, I
can run the program on the development workstation in debug mode, but I
can't run it on the same server accross the network from the test server.

I will do the research which will take me some time, but I don't see why
this is such a big problem. In classic ASP I used to just create my session
objects and go. Did Microsoft really complicate this so much that I will
need to take hours to learn the new architecture? Isn't there just
something in web.config or IIS that I can change to make these work right?
Here is the session state object in my web.config file:

<sessionState
    mode="InProc"
    stateConnectionSTring="tcpip=127.0.0.1:42424"
    sqlConnectionSTring="data source=127.0.0.1;Trusted_Connection=yes"
    cookieless="false"
    timeout="20"
/>

I just want to pass a variable through a session state. My question is:
what is the simplest way to get that done so I can let my beta-group test
this?

Scott

"Steven Cheng[MSFT]" <v-schang@online.microsoft.com> wrote in message
news:GHqstmc9DHA.704@cpmsftngxa07.phx.gbl...
> 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: Wont save session object
    ... client machine's cookie setting. ... the ASP.NET's session is by default associated with all the client ... something incorrect with the client's cookie setting. ...
    (microsoft.public.dotnet.framework.aspnet)
  • 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.aspnet.webservices)
  • Re: WebService session sessionstate SOAP
    ... InfoPath as a client doesn't respect the session cookie. ...
    (microsoft.public.dotnet.framework.webservices)