Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9142595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:49:05+00:00 2026-06-17T09:49:05+00:00

I am working on Asp.net MVC 2 app with c# by using vs 2010.I

  • 0

I am working on Asp.net MVC 2 app with c# by using vs 2010.I am having below mentioned error when I run my app locally under debug mode.

Error message image is as below :

enter image description here

Error message text is as below :

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.

What I did for sort out this issue are as below :

Try 1 : web.config file has been changed like below:

<system.webServer>
       <modules runAllManagedModulesForAllRequests="true">
        <remove name="Session" />
        <add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
</system.webServer

Try 2 is as below :

enter image description here

But Unfortunately still I am having same issue which I have mentioned Above.

UPDATE

enter image description here

Do you have any solution for this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:49:06+00:00Added an answer on June 17, 2026 at 9:49 am

    Did you enable the session state in the section as well?

     <system.web>
          <pages enableSessionState="true" /> 
     </system.web>
    

    Or did you add this to the page?

     <%@Page enableSessionState="true"> 
    

    And did you verify that the ASP.NET Session State Manager Service service is running? In your screenshot it isn’t. It’s set to start-up mode Manual which requires you to start it every time you want to make use of it. To start it, highlight the service and click the green play button on the toolbar. To start it automatically, edit the properties and adjust the Start-up type.

    Or set the SessionState’s mode property to InProc, so that the state service is not required.

     <system.web>
          <sessionState mode="InProc" />
     </system.web>
    

    Check MSDN for all the options available to you with regards to storing data in the ASP.NET session state.


    Note: It’s better to have your Controller fetch the value from the session and have it add the value to the Model for your page/control (or to the ViewBag), that way the View doesn’t depend on the HttpSession and you can choose a different source for this item later with minimal code changes. Or even better, not use the session state at all. It can kill you performance when you’re using a lot of async javascript calls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on eCommerce app Using Asp.net 3.5 MVC. On my Cart View
I'm working on an ASP.NET MVC app (using MVC3 RC2). Say I have 2
I am working on rewriting my ASP.NET MVC app using the domain driven design
I'm working on an ASP.NET MVC 3 app and it works fine when using
I am using the DataAnnotations for error checking on my asp.net mvc app, I
I am working on an ASP.NET MVC RC2 app using Entity Framework. This is
I'm working on an ASP.NET MVC app, designing the domain models, using (testing) the
I am working on an existing ASP.NET MVC app that started small and has
i've started working with ASP.NET MVC and using Entity Framework, concretely with SQLite db,
I'm working in ASP.NET MVC 1.0 using MvcContrib FluentHtml version 1.0. The following code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.