Ken Wong Software Development Blog

April 24, 2007

ASPState Installation Gotcha

Filed under: ASP.NET — canonw @ 11:08 am

My development machine is getting unstable. So I decided to reload my computer from scratch.

One of the tasks is to install ASPState to ASP.Net applications. It’s been a long time I install ASP.Net. And I’m repeating the same old mistake I made years ago.

I run this command:

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

That program guides me through a wizard. And it installs aspnetdb database on my machine.

But when I execute my ASP.net from Visual Studio, I get this error message:

Cannot open database requested in login ‘ASPState’. Login fails. Login failed for user ‘???’.

Hmm, that’s puzzling. I spent an hour finding out the error, and it turns out I need to run the command this way.

aspnet_regsql.exe -ssadd -sstype p -E

The wizard in aspnet_regsql.exe does not support for ASPState. I must add these parameters to create another database called ASPState.

Things are looking good. Well, almost. I got another error message when I run the ASP.Net application.

EXECUTE permission denied on object ‘GetMajorVersion’, database ‘ASPState’, owner ‘dbo’.

This is obvious to me. And the solution is simple. I must grant the database access to ASPState to appropriate users, and grant stored procedure in database ASPState EXEC permission to these users.

Here’s my lesson.

  • Write down note just to remind myself. I went through this problem before, and I totally forget all these details. If I spent time to write it down, I don’t have to go through the pain twice.

Here’s interesting link related to ASPState

2 Comments »

  1. [...] ASPState Installation Gotcha « Ken Wong Software Development Blog. [...]

    Pingback by Links | The Winding Journal — February 17, 2012 @ 2:54 am

  2. [...] ASPState Installation Gotcha « Ken Wong Software Development Blog. [...]

    Pingback by Useful Links | The Winding Journal — February 17, 2012 @ 3:08 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.