Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can we maintain State in Webservices
Do webservice have state ?
✍: Guest
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="TestWebServiceClass" %>
Imports System.Web.Services
Public class TestWebServiceClass
Inherits WebService
<WebMethod> Public Sub SetSession(value As String)
session("Val") = Value
End Sub
end class
Above is a sample code which sets as session object called as “val”. TestWebserviceClass is inheriting from WebService to access the session and application objects.
2007-10-23, 5656👍, 0💬
Popular Posts:
How can you write a loop indefinitely? Two examples are listed in the following code: for(;;) { ... ...
What is the benefit of using an enum rather than a #define constant? The use of an enumeration const...
How To Return the Second 5 Rows? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If yo...
What will happen in these three cases? if (a=0) { //somecode } if (a==0) { //do something } if (a===...
How to set a HTML document's background color? document.bgcolor property can be set to any appropria...