I have been getting the following error after publishing my site:
System.UnauthorizedAccessExceptionAccess to the path 'C:\inetpub\MySite\App_Data' is denied.
Turns out it's because it can't access App_Data\ASPNETDB.MDF. This is because it doesn't exist as my site doesn't use it. I checked my local machine and there is an App_Data folder with the database in but it isn't included in my build in VS. If I delete it however, it is recreated when I run the site in VS.
The site works fine after that once the error seems to clear itself but it happens every time I deploy.
There is no reference to it anywhere in code. How/Why is it getting created on application start and how do I stop it?
I am using SimpleMembership with all data stored in a SQL Server DB.