ASP.NET Website Administration Tool Problems

I’ve had 2 problems with the VS 2005 Website Admiistration Tool (WAT), first the site wouldn’t load in my browser correctly, saying unhelpfully that “an error occurred, please try restarting the tool”.

After much head scratching I went over to my Vista laptop, tried it out there and it worked fine. IT dawns on me then that my laptop has IE as the default browser while my dev box has Avant as the default browser. After making IE the default browser on the dev box, the WAT launches without a problem.

The second problem, on both my dev box and laptop occurs when you click on the Security tab. You get a number of error messages the most obvious one mention that it was unable to connect to the datasource and to check your settings on the Provider tab.

After some googling, it turns out that the culprit is a conection string setting which is configured while installing VS 2005. This setting is called LocalSqlServer and it can be found in your machine.config file in the .NET framework directory according to the version of the framework installed. On my machine the default setting is as follows;

  <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;
                                   Integrated Security=SSPI;
                                   User Instance=true"
                             providerName="System.Data.SqlClient" />

On my laptop I have SQL Server 2005 installed and on the dev box I have SQL Server 2000. The WAT tool uses the LocalSqlServer connection string to connect with a Datastore to use for the Memberships and Roles API, the default instance name for SQL Server 2005 is “SQLEXPRESS” hence the connection string above.The solution is to either change the default in machine.config, or preferably, modify your web.config file to remove the setting inhertited from machine.config and set a new connection string for your web project. After doing the later, my web.config file appears as shown below;

  <remove name="LocalSqlServer" />
  <add name="LocalSqlServer" connectionString="Data Source=HP6715s\MSSMLBIZ;
                       Initial Catalog=aspnetdb;Integrated Security=True"
                       providerName="System.Data.SqlClient" />

After making this change the Security tab for the WAT works correctly. I should point out that before doing this I’d already run the aspnet_regsql utility to create the schema for the Roles and Membership API, although apparently if you’re using SQL Server 2005 you don’t need to do this as the Wizard will do it for you, I never tried this so I don’t know if thats true.

Published by

Phil Harding

SharePoint Consultant, Developer, Father, Husband and Climber.

3 thoughts on “ASP.NET Website Administration Tool Problems

  1. Thank you very much for this post! I was looking all over the place for a solution, and you finally gave it to me!

  2. I’ve spen the best part of this afternoon trying to get this(WSAT) working in Firefox. I managed to get WSAT with Firefox once, which is why I have spent the afternoon . Not sure what I did, alas I could not get the security tab running and then I could not get anything running at all.

    So I:

    set IE as my default browser


    then added to web.config

    Works like a charm

    Thanks for the heads up

Leave a Reply

Fill in your details below or click an icon to log in: Logo

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.