Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Express deployed database is read only

Posted on 2007-12-02
3
Medium Priority
?
964 Views
Last Modified: 2013-11-27
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!
0
Comment
Question by:tmayne77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Expert Comment

by:imitchie
ID: 20392865
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.
0
 

Author Comment

by:tmayne77
ID: 20393332
Does this mean I should move the file elsewhere beneath the WWWROOT folder or above that somewhere in the directory structure?
0
 
LVL 25

Accepted Solution

by:
imitchie earned 1500 total points
ID: 20393350
somewhere else completely ouside of WWWROOT. Alternatively, you can leave it there, but just configure the permissions correctly. The SQL service account must be able to read/write the .MDF and .LDF files.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question