26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Webservices as such do not have any mechanism by which they can maintain<br />

state.Webservices can access ASP.<strong>NET</strong> intrinsic objects like Session , application etc. if<br />

they inherit from “WebService” base class.<br />

<br />

Imports System.Web.Services<br />

Public class TestWebServiceClass<br />

Inherits WebService<br />

Public Sub SetSession(value As String)<br />

End Sub<br />

end class<br />

session("Val") = Value<br />

Above is a sample code which sets as session object calles as “val”. TestWebserviceClass<br />

is inheriting from WebService to access the session and application objects.<br />

87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!