Web Service State Management

Because .NET Web Services are based upon System.Web.Services.WebService, they share the capability to access the ASP.NET Session and Application objects. We won't say that there is never a reason to use a Session object with a Web Service, but if you feel that your design calls for Session access, you should review your design. What you're saying is this—your Web Service maintains state across method invocations. How would you necessarily know which possible client to associate this state with? Yes, there are ASP.NET tools to help you do this, but from a design and best-practices standpoint, it's better to create stateless Web Services.

But notice that we mentioned the Session object, not the Application object. Application-wide ...

Get Applied SOAP: Implementing .NET XML Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.