PCinvent.info

PCinvent Studio Template

Dec 30 2007
Solve Unable to Pass AspNetSqlProvider test in ASP.net Web Site Administration Tool Print E-mail
Sunday, 30 December 2007


Read More Articles in: Technology>>>Website

This Article is written by This e-mail address is being protected from spam bots, you need JavaScript enabled to view it


After launched the Web Site Administration Tool  to do the membership & Identity (The Login Control), when I clicked on the "Test" of AspNetSqlProvider, it complicanted that it is unable to connect to the database, then I did the following and solve it......

 

I went to start=> Microsoft Visual Studio 2005=>Visual Studio Tools=>Visual Studio 2005 Command Prompt

Then, typed in aspnet_regsql, the GUi of SQL Server Setup Wizard will pop out. Followed the instruction and re-built the database.

 Last Step, I edited the machine.config in

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

 Don't know why the data source with the correct database server name didn't work,  I eliminated the name, so from original code of this XML:

<connectionStrings> 
    <add name="LocalSqlServer" connectionString="data source=.\MSSQLSERVER;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>

I changed it to: 

  <connectionStrings>
    <add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
  </connectionStrings>

Note that data source value is change from MSSQLSERVER to a dot "."

 

Then I did a test in Web Site Administration Tool again, the test was completed without any problem.

 

If this doesn't work for you, please check if "aspnetdb" exist in your sqlServer. Go to Visual Studio=>Server Explorer=>Data Connection and check it. Because by default, the AspNetAccessProvide is using aspnetdb as its database. so the name of it in the data connection is YourServerName.aspnetdb.do

Comments (2)Add Comment
...
written by pABLO, March 20, 2009
Thank you man!
...
written by admin, March 22, 2009
No Problem, glad that it helps!

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

busy
Tags:  Web Site Administration Tool sqlServer Connection Problem Data Source AspNetSQLProvider machine.config connectionStrings Login Control
Last Updated ( Wednesday, 26 March 2008 )
 
< Prev   Next >
Shutterfly.com
Site by PCinvent.com