Cannot open database "ASPState" requested by the login. The login failed.

  • Hi,

    I've just run this command to setup sql server session state

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>Aspnet_regsq

    U sa -P password -d SessionStateDatabase -sstype c -ssadd

    but now when I browse to my website I get this error:

    Cannot open database "ASPState" requested by the login. The login failed.

    can somebody show me where I have gone wrong please.

    Many thanks,

  • Here's a link with a similar issue. Does it help?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Thanks for you reply

    cant see an article on the issue in the link you provided.

  • Really? How odd. I wonder if the forum is blocked from your internet connection.

    The actual link is here http://forums.asp.net/t/951690.aspx.

    If you still can't see it, the advice is:

    Login into SQL Server database with loginid as 'Sa' and password 'xxxxx'

    Create a new login(security-- > Logins ) named as 'ServerName/ASPNET' in windows Authentication mode with sysadmin as the role and map the ASPState database in user mappings.

    I'm not sure how well this will work, or if it does, but the person responding says it worked for him.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • thanks, I tried that but still having the same problem.

  • got this working by dropping the custome named database and re-runnung aspnet_regsql.exe with the following:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -S BPPAPPSDBVM -

    E -ssadd -sstype p

    now is working fine.

    thanks for your assistance

  • Just another quick question, my website has a few 100 users, when I switch over to sql server session state, will it have an affect on the users that are logged in at the time?

    thanks

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply