Quantcast
Channel: Configuration and Deployment
Viewing all articles
Browse latest Browse all 3561

An attempt to attach an auto-named database for file \ASPNETDB.MDF failed

$
0
0

I have an asp.net website that I've adopted but had running for a year or so. The machine that was hosting it died and as a result was replaced. I'm trying to get the site back up but running into the following error message whenever I try to naviage to any portion of the site that utilizes the attached database (such as logging in):

An attempt to attach an auto-named database for file C:\SiteFolder\SiteName\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.

I have administrative rights, I'm able to browse to the file, attach and open it in SQL Management Studio. My site and DefaultWebSites are the only two listed under IIS. Default is stopped. 

I've searched around and found some information, I tried modifying my connection string to include: user instance=True;

This resulted in the first error message including an operating system 5 error:

Unable to open the physical file "C:\SiteFolder\SiteName\App_Data\ASPNETDB.MDF". Operating system error 5: "5(Access is denied.)".

Thanks in advance for any assistance you can provide.


Viewing all articles
Browse latest Browse all 3561


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>