For a proxy based client side approach to Web Services you will need to
create a cookie container for the proxy instance.
The client application' proxy uses the HttpClientProtocol classes which
by default do not know about sessions. Therefore you have to enable
cookie management in the client proxy class by adding code like this in
your client application:
   myProxyClass.CookieContainer =
       new CookieContainer();

It is important to mention that the session is only valid for a single
client proxy instance.
Of course the sample assumes you have configured your Web Service
correctly to maintain session state. You need to set the
[EnableSession=True] property of the WebMethod attribute which should be
included in ASP.NET's session management.

Cheers,
Christian
---------------------------------
  .NET XML Web Services Repertory
   http://www.xmlwebservices.cc/
---------------------------------

Jeremy Hopkin wrote:
>>I get the idea of how to maintain session on the server. Is
>>their intrinsic support for session state on the client side, or do we have
>>to explicitly pass the cookies around?
>>
>
> Its automagic, and you don't have to do anything, although I admit I
> haven't tried it with cookies disabled, so I am assuming that works also.
> But don't quote me on the cookieless, working...
>
> (But I imagine it will ;-)

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to