471,066 Members | 1,298 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Error with ASPNETDB.mdf once deployed the application web

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..? Im lost..!

thanks!

Jan 4 '07 #1
1 1708
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.


CFTK wrote:
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..? Im lost..!

thanks!
Jan 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jordan S. | last post: by
reply views Thread by RAM | last post: by
13 posts views Thread by AAaron123 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.