State database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?RHVrZSAoQU4yNDcp?=

    State database

    We are setting up a web farm and want to store session state on a SQL Server
    2005 Enterprise sp2 database. But when the web sites try to access the
    session state we get the error...

    Unable to use SQL Server because ASP.NET version 2.0 Session State is not
    installed on the SQL server.

    We installed the custom state database using...
    aspnet_regsql -S mysvrname -E -ssadd -sstype c -d mydbname
    ....and can see the database.

    The web.config has
    <sessionState
    mode="SQLServer "
    cookieless="fal se"
    allowCustomSqlD atabase="true"
    timeout="20"
    sqlConnectionSt ring="sessionCo nStr"/>

    Where sessionConStr is defined in the <connectionStri ngssection...
    <add name="sessionCo nStr"
    connectionStrin g="server=myser vername;databas e=mydbname;Trus ted_Connection= yes;Connection Timeout=10;" providerName="S ystem.Data.SqlC lient"/>
    I'm confident in the connection string because if I change it to point to a
    non existent database then I get a login failed error. So I know that the
    connection string is finding the database.

    Any ideas why we get the error message?
    Unable to use SQL Server because ASP.NET version 2.0 Session State is not
    installed on the SQL server.

    Thanks,
    Andrew

  • Spam Catcher

    #2
    Re: State database

    =?Utf-8?B?RHVrZSAoQU4 yNDcp?= <Duke@newsgroup .nospamwrote in
    news:42079F11-56C9-4434-B75A-31CEDB828D07@mi crosoft.com:
    Where sessionConStr is defined in the <connectionStri ngssection...
    <add name="sessionCo nStr"
    connectionStrin g="server=myser vername;databas e=mydbname;Trus ted_Connect
    ion=yes;Connect ion Timeout=10;" providerName="S ystem.Data.SqlC lient"/>
    I'm confident in the connection string because if I change it to point
    to a non existent database then I get a login failed error. So I know
    that the connection string is finding the database.
    >
    Any ideas why we get the error message?
    Unable to use SQL Server because ASP.NET version 2.0 Session State is
    not installed on the SQL server.
    ASP.NET runs under the Network Services account on Windows 2003 - does that
    account have access to your database? If not, you may want to hard code in
    the log in credentials into your connection string.

    --
    spamhoneypot@ro gers.com (Do not e-mail)

    Comment

    • =?Utf-8?B?RHVrZSAoQU4yNDcp?=

      #3
      Re: State database

      Thanks for your input. We are using a specific domain account rather than the
      default account. The domain account then uses a trusted connection to the
      database.
      I suppose I could get the dbas to give the account db_owner rights to see if
      that cures it, and if it did we could start reducing permissions from there.

      Comment

      • =?Utf-8?B?RHVrZSAoQU4yNDcp?=

        #4
        Re: State database

        Solved it. The account needed execute permissions on all the stored procedures.
        It doesn't seem to need db_datareader.

        Comment

        Working...