.NET General - Do webservices have state ?
Interview Question Database For Software Developers
|
|
| Do webservices have state ? | | .NET INTERVIEW QUESTIONS - Do webservices have state ?
(How can we maintain State in Webservices ?) | | By: |
Webservices as such do not have any mechanism by which they can maintain state. Webservices can access ASP.NET intrinsic objects like Session, application and so on if they inherit from “WebService” base class.
<%@ Webservice class="TestWebServicesClass" %>
Imports System.Web.Services
Public class TestWebServicesClass
Inherits WebService
<WebMethod> Public Sub SetSession(value As String)
session("Val") = Value
End Sub
end class
In this example code we set a session object called as “val”. TestWebservicesClass is inheriting from WebService to access the session and application objects.
| | ID: 2335 | Rank: 202 | Votes: 0 | Views: 69 | Submitted: 20091020 |
202 :-) | | Do webservices have state ? | | .NET INTERVIEW QUESTIONS - Do webservices have state ?
(How can we maintain State in Webservices ?)... | | Submitted: 20091020 |
|
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|