Recently I installed Visual Studio 2005 (Release Candidate) at my home computer to explore a new feature of C# 2.0 : WebParts. When I compiled my WebPart demo and tried to run it, the following error was presented to me:

After doing some searching I discovered that the source of this problem could be found in the machine.config file. In the machine.config you'll find a connectionstring with the name 'LocalSqlServer'.

The problem with this autogenerated connectionstring is that it assumes that I had an instance of SQL Server 2005 Express Edition installed, when in fact I am running an instance of good ol' SQL Server 2000. So the solution to this problem is to change the current connection string in machine.config into the proper connection string. If you have the same problem as I did, but don't have acces to the machine.config, you can solve this problem by adding the following lines to the web.config of your application (off corse you'll first have to replace the dots with real values):
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString=".." providerName=".." />
</connectionStrings>
When I tried to run my WebPart demo agian, I was presented with an error indicating that the aspnet_CheckSchemaVersion stored procedure could not be found.

The solution for this problem is provided by Microsoft self. They provided a SQL Server Setup wizard which will solve all your problems.

This wizard can be found at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ and is named aspnet_regsql.exe. All you have to do during the steps of this wizard is to select your SQL instance and your database and the wizard will take care of the rest. When I tried to run my WebPart demo again everything runned smoothly.