"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>\<system.web>\<httpModules> section in the application configuration.".
This error occurs if you are using Session State in your ASP.Net Pages.
Session["Name"] = "Bhupesh Sharma"; //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" />
Saturday, July 16, 2011
ASP.Net-Common occur while enabling Session State
Subscribe to:
Post Comments (Atom)
How to upload app to macOS
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
Troubleshooting steps: Explicitly set LineBreakMode to WordWrap in XAML or code Verify label's HorizontalOptions and VerticalOptio...
-
Sample Code: if (Email.Default.IsComposeSupported) { string subject = "Hello!"; string body = "Excellent!"; ...
-
Generating an API Key Before you can add an Apple Developer Account to Visual Studio, you'll need to generate an API Key. Generating a...
No comments:
Post a Comment