Saturday, December 06, 2008

Asp.net Web Administrator tool Workarround in Windows Vista

How did I get my Web Administrator tool(WAT) running under Windows Vista

The development environment I am working on is:

  1. VS 2005,
  2. Windows Vista
  3. SQL Server Management Studio Express

The Problem

The problem I had was that I got an error message when I clicked on AspNetSqlProvider Test click, as following:

"Could not establish a connection to the database.If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider."

How I fix it:

The valid steps I made to fix the problem were:

  1. First of all, make sure that run the VS2005 as administrator.
  2. As what the Microsoft suggest, use aspnet_regsql command-line to create and configure the database, but unfortunately it doesn't tell us where the utility is, which is quite frustrating. so I have to google a bit over Internet, and finally found the path to it is C:\Windows\Microsoft.NET\Framework\. After I run the command, just followed the guide to create the aspnet membership database that holds idenditiy details.

    Sometimes, things just don't go smooth as you expect. During the progress of installing aspnetdb, I got a permission issue, saying that I don't have enough permission to use master database. The fix is that

    go to SQL Server Surface Area Configuration -> Click on "Add new administrator" -> grant the avaiable privileges to specified account-> click "Ok"
  3. Now I can see I got a new database called "aspnetdb" in Sql server Express that contains serval tables that are needed for aspnet Membership system, but when I went back to WAT, the message was still there.
  4. Go to event viewer, it will tell you more information such as any error or warning. one of errors I got was

    Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances. [CLIENT:
    the fix was

    > Open a SQL Server 2005 Management Studio Express.
    > Connect to the default instance of that server (PC-Name\SQLEXPRESS)
    > Open a New Query Window, ensure that you are connecting to the master database
    > Type: exec sp_configure 'user instances enabled', 1
    > Type: RECONFIGURE
    > Restart the SQL Server


    After fixed this problem, I got another one here:

    Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. [CLIENT: ]

    Most of articles suggest that delete C:\Users\<accountname>\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS, (in WinXP the path is different - C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS) folder, my magic was to make sure the SQL server express service is running as Local system account.
  5. and sometimes you can't see the error in the eventviewer, but you still keep getting the error message. then you need to check out the error.log file which under this path (in window vista) C:\Users\<accountname>\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

and eventually, after 1 day, i got my WAT work.

Labels: , , , , , , ,

0 Comments:

Post a Comment

<< Home