Last post Sep 18, 2014 01:45 AM by Starain chen - MSFT
Sep 16, 2014 08:21 PM|pelalusa|LINK
When I was building my ASP.NET 4.0 application with VS2012, I don't believe there was ever a necessity to have the App_Data folder present. It definitely wasn't included when I published the site.
Now that I've upgraded to VS2013, I'm getting an "Access denied creating App_Data subdirectory" error.
So I looked around and
found this. I realize it's for MVC but Step #7 seemed relevant: In the Settings tab, expand File Publish Options, and then select Exclude files from the App_Data folder.
Unfortunately, even when this is checked, I'm still getting the same error.
What I think it comes down to is this: I am indeed using SQL Server Express but is "ASPNETDB.MDF" (inside App_Data) absolutely necessary?
Any ideas to avoid having to have an App_Data folder would be much appreciated!
Sep 17, 2014 05:04 AM|AidyF|LINK
You need that if your project uses membership
Sep 18, 2014 01:45 AM|Starain chen - MSFT|LINK
How do you get that error? Do you get that error when access your website. (E.g. register a user)
If that is the case, I think you are using the EF to generate the database, however the current user (by default IIS use the
ApplicationPoolIdentity as the identity) hasn’t enough permission to create folder.
The option of exclude files from the App_Data folder, it will exclude that folder when publish the project.