Can be disable session state for whole application if yes then how?

 Posted by Rajni.Shekhar on 4/10/2012 | Category: ASP.NET Interview questions | Views: 2323 | Points: 40
Answer:

Yes, we can disable session state for whole application by setting in web.config file

<configuration>

<system.web>
<pages enableSessionState="false" />
</system.web>
</configuration>


But if you want to enable session state in perticular pages you can set enableSessionState="true" in page directives.

<%@ Page EnableSessionState="true" %>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response