Error with ASPNETDB.mdf once deployed the application web

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!
 
M

mike

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top