How do you manage session in ASP and ASP.NET

Questions by neha_nagpur

Showing Answers 1 - 1 of 1 Answers


  • Oct 6th, 2010

Session Configuration: Any web application is not possible without having session as web pages are stateless so you can configure session in load balancing also. There are two configuration which can be used in load balancing environments. One is state service and another is Storing session in SQL Server.
You can configure session state mode in your web.config like following.
<sessionState mode="SQLServer" StateConnectionString="tcpip="         SqlConnectionString = "data source=SERVERNAME; user id=sa; password=sa"  cookieless="false" timeout="20" /> 

enableViewStateMac="false": This is a alternative approach to machine key. This will tell engine that whether it should check Machine authentication check or not and if you made it false then it will not check for machine authentication. You can define that in your web.config pages section like following.

  1. <system.web>  
  2. <pages enableViewStateMac="false" />  
  3. </system.web> 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions