troubleshooting Question

attach database - access denied

Avatar of -Dman100-
-Dman100-Flag for United States of America asked on
.NET ProgrammingMicrosoft SQL Server 2008
2 Comments1 Solution1214 ViewsLast Modified:
I'm using Sql Server Express 2008 and I'm trying to attach a datbase .mdf file that is located in the app_data folder of a web application in my development environment.

When I try and attach the database, I get the following error message:

Unable to open the physical file "C:\My Documents\Visual Studio 2008\Projects\Security\Projects\Web App\Security\App_Data\Security.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

I tried to add the ASPNET user to the directory, but the ASPNET user was not listed?  How can I resolve this issue and get the database attached.

Thanks.
ASKER CERTIFIED SOLUTION
Coralie Crumrine

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros