TLDR see below line
In my attempt to enable Roles, I've had nothing but one hurdle after another. As soon as I sort on out, there's another one. I'm at my wit's end.
I'm using code first migrations in VS2015 Enterprise with MSSQLServer 2014. I've added the express tag, as it is in the error message. My site is hosted by smarterasp.net.
These have been my latest troubleshooting steps to lead me to where I am now:
I have gone from this:
"The certificate chain was issued by an authority that is not trusted" when connecting DB in VM Role from Azure website
To this:
Access denied creating App_Data subdirectory Description: For security reasons, the identity 'NETWORK SERVICE' (under which this web application is running), does not have permissions to create the App_Data subdirectory within the application root directory. ASP.NET stores the Microsoft SQL Express Database file used for services such as Membership and Profile in the App_Data subdirectory of your application.
I've included a screenshot from part of this page:
Now the instructions on that error page are clear, I had already followed the MSDN instructions on this, I even set it to allow modify (frantic stabs in the dark)
So my:
- Visual Studio folder gives NETWORK SERVICE read permissions.
- Project Name (under the Visual Studio/Projects/Project Name) folder provides NETWORK SERVICE modify, read&execute, read and write permissions.
- Likewise, the App_Data folder does the same.
In my web config I have:
<roleManager
enabled="true"
cookieName=".ASPXROLES" cookieTimeout="30"
...
defaultProvider="AspNetSqlRoleProvider">
</roleManager>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient"
type="System.Data.Entity.SqlServer.SqlProviderServices,
EntityFramework.SqlServer" />
</providers>
I have no idea what I'm doing wrong.
Any help is appreciated.
edit
I'm banging my head against a wall.
I think this is the problem, there is a read only property checked on the App_Data folder, when I go into the settings for this and the mdf and log files within it, they all have read and write access and full control on the user account.
I have disabled inheritance from parent folders.
Tried propagating inherited properties from parent folders.
I've checked my server allows remote connections and any permissions I can find anywhere in IIS, SqlServer, the folders and it's driving me crazy.
I can't get this read only property unchecked.