One of the most common challenges that Web developers encounter is maintaining state in the stateless world of HTTP. There have been a number of clever means used to get around the stateless issue, from reposting application data with each request, to using HTTP authentication to map requests to specific users, to using HTTP cookies to preserve the state of a series of requests. One particularly clever way of maintaining state that hides all the challenging work below is to simply use the Microsoft® ASP.NETSystem.Web.SessionState.HttpSessionState class. You can use the ASP.NET HttpSessionState class from a Web method just as you can from ASPX pages, but things work a little differently for Web methods.
For detail click here
What are those different things?
ReplyDeleteWhat service we need to turn on for using Session State?
How do we decorate our class to pass it to session, in case of Session state?
The detail is mentioned on the link i.e.
ReplyDeletehttp://msdn.microsoft.com/en-us/library/aa480509.aspx
For Session state we need to start ASP.NET State Service, in services console.In addition to this we need to decorate the web.config, with the following configuration:
Thirdly we need to make our class serializable, in order to float it in our Session state.
e.g.
[Serializable]
public class ItGuy
I hope, you get the answers.
Happy Coding... :)
sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120"/
ReplyDeletemera ki qasoor hai ustaad jee. menu te bahar kado is mailing list tu.
ReplyDeleteI didn't do it Bligger..... :)
ReplyDelete