I have just reciently installed and started upgrading the last beta code to this beta and am having a problem conecting to my sqlinstance with the WebSite Configuration Tool.
The error indicates it is looking for a file in the app_data directory. (empty), but everthing else points to SQLServer (express) as being the issue.
I have run aspnet_regsql.exe (both on my default instance of sql (a sql2kas) and the beta2 instance that shipped with VS.
Both created datasases and eveyting looked good inside the db's.
However when I click the "Securtiy tab" I get a message "Unable to connect to SQL Server Database."
When I go to The Provider Tab, there is nothing to configure, just a test Hlink that generates the following when clicked.
SQLExpress database file auto-creation error:
The connection string specifies a local SQL Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The .......
I have run SQL Trace (profiler) against both instances of SQL when aps is trying to connect, but neither show anything.
I keep feeling like I must have missed something.. Anyu clues are welcome.
Rob

Asp.Net not finding the SQLServer for setting up Security problem
Ronak
<
connectionStrings><
remove name="LocalSqlServer" /><
add name="LocalSqlServer" connectionString="Data Source=localhost;initial catalog =aspnetdb;integrated security= true" providerName="System.Data.SqlClient"></add></
connectionStrings>i tried wat u said above i want to know 2 things
1)why this happens like this
2)i tried this for one application if i want to do this for one more application in my standalone computer it fails !!!
can u plz help me for these two queries
with regards
kesavan
Rodrigo Pires
I have the same problem :S
<
connectionStrings><
remove name="LocalSqlServer" /><
add name ="LocalSqlServer" connectionString="Data Source=localhost;initial catalog = memberDB;integrated security=true
" providerName="System.Data.SqlClient"></
connectionStrings>i still get error
Error 4 XML document cannot contain multiple root level elements.
:S:S
janiv
the first three steps done greatly
the fourth is not
i did not find any <connectionStrings> in my web.config
i'm just a beginer
thank u
Roshan Sathaar
x0ras
Mohamedwaly
This I fixed by editing the Machine.Config file and changing the Connection String for the Database Access. (Can't remember just which one, but if you do a search for SQLExpress in teh machine.config you will find it.)
HTH
Rob
DHLennon
1) Create a database in SQL Server (2000 or 2005) and make sure that you give the ASPNET account permissions to this database.
2) Run the aspnet_regsql.exe file in your System%Root\Microsoft.NET\Framework\v2.0.xyz directory. This will open an ASP.NET SQL Server Setup Wizard which will create the objects necessary for ASP.NET security.
3) Point to the database you just created.
4) In your web.config file, locate the <connectionStrings> element and add the following:
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=localhost;initial catalog=<your database name>;integrated security=true" providerName="System.Data.SqlClient">
This overrides the default SQL Express and points to the new database you just created - be it in the same machine or a different machine. You can also change the configuration in the machine.config file although this will affect every web application sitting on top of your machine.
eisebs
Hi bass_player,
I think I was a bit late in getting this error, but when I got it in 2007 your post of 2005 saved my day.
Thanks a lot
RaghavS
Javedkomal
Worked !
Thanks a lot.
(I can now start growing my hair back
)
Bill
Michelle Cheng
Place the <connectionstrings>...</connectionstrings> section right before the <system.web> seciton
endtje
<connectionStrings>
<remove name="LocalSqlServer" />
<add name ="LocalSqlServer" connectionString="Data Source=localhost;initial catalog = memberDB;
integrated security=true " providerName="System.Data.SqlClient">
</connectionStrings>
I think your error might be pointing to the Add tag as it is missing the Close Tag. However you seem to have an XML issue, not the issue that started the thread..
Rob
E.G. (highlighted in red)
<add name ="LocalSqlServer" connectionString="Data Source=localhost;initial catalog = memberDB;integrated security=true " providerName="System.Data.SqlClient" />