Results 1 to 3 of 3

Thread: Need some help with session state

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2005
    Posts
    323

    Need some help with session state

    Hi all,

    I had a site working great on my testing machine. I made a change to the IIS configuration so that the default site would be something different than what it was. Now when I try to run the site that was working, I am getting "Session state can only be used when enableSessionState is set to true". So I looked through the web and modified my web.config file (not sure why all of a sudden it's an issue) but nothing has worked.

    I am using IIS 5.1 as the server (yes, I know, it's old). I added the following in my web.config:
    Code:
        <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID" enableSessionState="true" enableViewStateMac="true" enableEventValidation="true" >
          <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </controls>
        </pages>
    But I still am getting the error referenced from a scriptresource.axd file . Any ideas where to look?

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2005
    Posts
    323

    Re: Need some help with session state

    Some additional info.

    The page itself loads. However, when I click Logon that's when I get the error. It's in C#

  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Need some help with session state

    Hello,

    Are there any other web.config files in your application? Remember, ASP.Net stitches all the web.config files together with the machine.config file, and whichever one is "last" in the line is the value that is used for your application.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width