Error with ASPNETDB.mdf once deployed the application web

  • Thread starter Thread starter CFTK
  • Start date Start date
C

CFTK

This is the error I get when I try to login in my application from
another machine:

An attempt to attach an auto-named database for file C:\Documents and
Settings\....\App_Data\aspnetdb.mdf failed. A database with the same
name exists, or specified file cannot be opened, or it is located on
UNC share.

What should I do..? I´m lost..!

thanks!
 
This is what I did on WebHost4Life to get mine up and running

upload the ASPNETDB.MDF file to the App_Data folder - do not upload the
LDF file.

Here is the connection string entry in my web.config that is working.

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data
Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;
Integrated Security=SSPI;

Connect Timeout=30;
Initial Catalog=ASPNETDB;"
providerName="System.Data.SqlClient" />
</connectionStrings>

NOTE: The blank line was User Instance=True; That caused problems and
I read some other posts saying that it should be removed.

Hope this helps! I have seen alot of folks having trouble deploying
their SQLExpress DB's It would be nice if there was an easy way to
deploy and not mess with settings in config.
 
Back
Top