Last post Sep 19, 2017 07:30 AM by Cathy Zou
Sep 18, 2017 03:50 PM|Rhup|LINK
Newbie to ASP.NET here. I trying to follow a tutorial (Getting Started with ASP.NET 4.5 Web Forms and Visual Studio 2013.pdf), I'm following step by step. All seems to be find, the solution builds find, but I get a run-time error (Unable to open the physical
file "C:\WT\WToys\WToys\App_Data\wtoys.mdf". Operating system error 5: "5(Access is denied.)". The problem seems to be file/folder permissions, according to my research. The issue is that all the articles talk about attaching a fine once it is created on
the SQL Management Studio, which can also do, but the tutorial shows the file being attached/created on the fly, there is where the error occurs. Here is what I'm running:
Windows 10 Pro on a domain
Visual Studio Community 2015 (Web Forms Project)
SQL Express 2014 (V.12.0.4232)
The tutorial uses Entity Framework. I have given full permissions to all users in the security tab (Authenticated Users, local domain users, domain users), SQL Server account on the Services window to no avail. I must say that I can create a database
and attache it using SQL Management Console, but not at run-time. Any help would be appreciated.
Sep 18, 2017 08:48 PM|Rhup|LINK
Sorry about the confusion. At the end, permissions were not the issue. In the past I had started this same tutorial, I created a database manually with the same name and although I had renamed the original database, SQL remembered it. I found SQL has an
internal database that needs to be taken care of before you can use the same name for another database. Thanks anyways.
Sep 19, 2017 07:30 AM|Cathy Zou|LINK
It seems that you problem has been solved.
I suggest you could close this thread by marking your reply as answer.
Welcome to our forum next time