Solved

SQL Express deployed database is read only

Posted on 2007-12-02
3
954 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
  • 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 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now