When you create a Web service, you specify whether it should be executed within the context of an HTTP session. Associating Web services with a session enables an application to maintain state across Web service calls and to use login information for security purposes.
To allow multiple Web services to share a session, two things need to happen:
The Web service client must allow a session to be shared across certain Web service calls. To do this, the client must pass a session cookie between calls.
The Web services themselves must support sessions. When you create custom Web services, the Web Service Creation Wizard gives you the option of supporting sessions.
This chapter includes an example of a helper class that you can use to simplify cookie management. See Writing a CookieContainer Class.