Session State Setting web config

how to configure web config for storing session state in out process

If you want to store session in sql server

modify your web config as follow

<sessionState mode="SQLServer" sqlConnectionString="data source=server=servername;uid=username;pwd="password"/>

and if want to store sessioin in state server than modify web config as follow

<sessionState mode="StateServer" stateConnectionString=""
cookieless="false" timeout="20" />

and Start ASPNET Services
Go to control panel
Administration tools
ASPNET state services (right click and start)

now session will store on state server

Related Articles

ASP.NET 4 Brings Clean Web.config Files

Major configuration elements have been moved to the machine.config file in .NET 4 With the advent of the latest iteration of Microsoft's development platform and tools, the company took a number of steps designed to result in optimized desktop and Cloud applications for devs, simply by leveraging Visual Studio 2010 and .NET Framework 4. An illustrative example in this regard is the new Web.config file that can accompany ASP.NET 4.

More articles: Web.config


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: