Re: Session("MyName") not working

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dino Chiesa [Microsoft] (dinoch_at_online.microsoft.com)
Date: 09/03/04


Date: Fri, 3 Sep 2004 14:01:50 -0400

Yes, this is a FAQ.

check http://www.xmlwebservices.cc/index_FAQ.htm
and search for "Session"

-D

"Vincent Finn" <1@2.com> wrote in message
news:14jej0hcsen13nk4vj6npjfc80erpmaoe3@4ax.com...
> Hi,
>
> I am trying to store an object in the Session()
>
> I have a VB.Net control which is loaded in an asp page and then calls
> a function in my webservice (also written in VB.Net)
>
> The web service function has everything it seems to need the code is
> at the bottom of the mail
>
> The MSDN makes some mention of needing to do something on the client
> side with regards to cookies but I can't find a decent example
>
> Can anyone tell my what I need for the client side?
> or have I done something wrong in the WebMethod?
>
> Vin
>
>
> <WebMethod(Description:="Desc", EnableSession:=True)> _
> Public Function MyFn()
> If (Session("MyName") Is Nothing) Then
> Session("MyName") = DateTime.Now()
> End If
> Dim dt as DateTime
> dt = Session("MyName")
> End Function
>



Relevant Pages

  • Re: Parameters to image.php
    ... > 29 nov 2005 ta shuo le: ... >> If you have a few simple things to send by the client, ... store the game record data in $_SESSION. ...
    (comp.lang.php)
  • Re: Where does session store its value. Server or at client.
    ... as an existing user is held in a cookie on the client. ... passed via the querystring rather than being held in a cookie. ... I am trying to use sessions to store some values. ... where does session store the value. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Where does session store its value. Server or at client.
    ... The data is stored on the server, but the session ID that identifies you as ... an existing user is held in a cookie on the client. ... I am trying to use sessions to store some values. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How Can I Define Global Classes In Web Application ?
    ... Storing objects in another object (especially in the session object) is *always* a Bad Idea. ... asp.net faq: http://asp.net.do/faq/ ... myObject myObjectInstance = new myObject; ... I would store the information needed to re-produce the object and it's ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: persistant datalayer across http requests?
    ... The ASP.NET way is to store in session ... variables small units of data that will let you re-populate major data ... > middle tier in memory across multiple http request from the client ...
    (microsoft.public.dotnet.framework.aspnet)