Link to home
Start Free TrialLog in
Avatar of tmayne77
tmayne77

asked on

SQL Express deployed database is read only

I developed an ASP.NET website using VS Web Developer Express with an SQL Express database as an attached file.  I copied my website file and app_data folder (with contents) to the server that is going to run the website.  The server is also running SQL Express.  When I attempt to run the program and update the database I get the "Failed to update database "C:\INETPUB\WWWROOT\DOMAINREQUEST\APP_DATA\DOMAINS.MDF" because the database is read-only" error.  If I connect to the database using the SQL Manager the database option for read-only is set to false.  If I attempt to modify the [guest] and [user] permissions and then view the website I get an error that "NT AUTHORITY\NETWORK SERVICE" is unable to connect.

I've been searching the newsgroups/web for 2 days now trying to find a solution.  Please help!
Avatar of imitchie
imitchie
Flag of New Zealand image

The error relates to the fact that the physical file - C:\INETPUB\WWWROOT\DOMAINREQUEST\APP_DATA\DOMAINS.MDF
is read only by the account "NT AUTHORITY\NETWORK SERVICE", which is set up to run SQL Server.
WWWROOT subfolders usually are very restrictive. Consider moving the .MDF file elsewhere.
You may have to reset permissions after the move.
Avatar of tmayne77
tmayne77

ASKER

Does this mean I should move the file elsewhere beneath the WWWROOT folder or above that somewhere in the directory structure?
ASKER CERTIFIED SOLUTION
Avatar of imitchie
imitchie
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial