An attempt to attach an auto-named database for file "C:\AAA\database.mdf" failed. A database with the same name exists, or specified file cannot be o

This one of the next headache you have to solve at the time of hosting your application in any web server, and its as follows:

An attempt to attach an auto-named database for file c:\hosting\webhost4life\member\shanti23\aba\LatestABAWebsite\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.

we have to add following few lines to the App.conf file as below:

just refer the link: http://dotnetforum.lk/blogs/ammar/default.aspx


alternatively you can rename the database at the time of deploying the web application if any further exception bugged you! hopes this will help you all!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: