Tuesday, February 13, 2007

EnableSessionState, ASP.NET most common error

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <*configuration*>*\**\*<*httpModules*> section in the application configuration.


When you'll encounter this kind of error? This occur when u are using state in your ASP.NET pages. For instance, you might be using

Session["Username"] = "Carso Owen"; //in your c# code

The solution is you need to do these 3 things in your ASP.NET web.config:

1. locate under the <*system.web*> <*sessionState mode = "InProc"/*> ... <*/system.web*>

2. modify the <*httpModules*><*add name="session" type="System.Web.SessionState.SessionStateModule"/*>

3. modify <*pages enableSessionState="true" */>

P/s : plz ignore the those * in the above.

3 comments:

Anonymous said...

Thank you, this was very helpful

Anonymous said...

thnx

interracial ebony sex stories said...

The next day, after a surprising realization, I asked my doctor to putme on the pill. ``I know.
adult true sex stories
animal fuck stories
free incest porn stories
true girdle sex stories u.s
sexy wife fucking strangers stories
The next day, after a surprising realization, I asked my doctor to putme on the pill. ``I know.