How do you manage session in ASP and ASP.NET

Questions by neha_nagpur

Showing Answers 1 - 3 of 3 Answers

agk484

  • 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=127.0.0.1:42424"         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 asp.net 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