Failed to update database because the database is read-only


i am currently testing my website on IIS7, and first error is that:

Server Error in '/' Application.

Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Source Error:

Line 109:
Line 110:                conn.Open();
Line 111:                SqlDataReader reader = command.ExecuteReader();
Line 112:                reader.Close();
Line 113:                command.Connection.Close();

i cheked on aspnet_Data folder to see if is read-only AND IT IS, but if i change it, the read-only property is setting up again. why?

thanks in advance

3/31/2008 3:17:51 PM 29906 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 37

3/31/2008 3:33:30 PM

Similar Artilces:

Failed to update database because the database is read-only.
 HelloI have just installed IIS7 on Windows Server 2008 (second time)I have a website witch worked perfectly, but now when i am trying to execute an sql command i get the folowing errorFailed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only. Linha 185:Linha 186: conn.Open();Linha 187: reader = comm.ExecuteReader();Linha 188: reader.Close();Linha 189: comm.Connection.Close(); What is wrong? ho...

Failed to update database because the database is read-only. #2
Hello, It took a while, but for the first time in my life i am coping with a problem i can't google out of existence. What i did is make a website in with an MS SQL database in Visual studio 2008. In the development enviorment everything works fine, i then proceeded to publish the website to the standard window ISS directory (C:\inetpub\wwwroot) and again everything works fine. It's a weblog so i started writhing posts, database updates fine. everything works. And then, a few days later, out of nowhere the database decides to be read only magically all by itself and i get ...

Failed to update database "C:\INETPUB\..." because the database is read-only.
Hi there,I am getting a real problem with ASP.NET 2.0, all i am trying to do is run a recovert password (using the login controls) and i got the following error.Does anybody know how to fix this? I have tried the SSEUTIL answer here and it didn't work. also ensured that Network Services user has READ/WRITE/EXECUTE premissions on the directory below and that each file isn't read only and also that it inherits ACL from the directory which it seems to do..Bit of strange one this, it isn't created (and i am not using) a beta version of VS 2005 Pro... b...

Failed to update database "MyDatabase.MDF" because the database is read-only
Hi, Can any one help me regarding this err "Failed to update database "MyDatabase.MDF" because the database is read-only "? I have encountered this error message when I deployed my website with webparts in the IIS and when i browse the page it display such error.Regards,Vinz"Code, Beer and Music" that's my way of being a programmer!How to get your Forum Question Answered | Blog | CodeASP.NET Have you checked the database? You should unset its read only attribute with sql server management studio. Right click on the database, choose properties, choose opti...

Update 1 read/write database from a read-only database
Hello,   I am designing an application that uses two databases, one is read-only and the other is read/write. Customer logs in and selects a product from the dropdown list which populates a details view with the query items from the read-only Db, then manually fills in some other information and on a button click, writes all the data from the details to the read/write database. Including the data that came from the read-only database. Is this even possible? Yes, you can do that, you need to open two separate connections for each database.Hope this helps,Vivek Social ...

Failed to update database "C:\LOGIN1\APP_DATA\ASPNETDB.MDF" because the database is read-only.
Hi Guys I'm able to run my login in visual web developer's debug mode but I'm not able the create a user or login in as a remote user. I'm using visual web developer Membership and roles, Window XP Pro, IIS 5.1. Below is the error. I have read about this error in this forum but i can't get it working. Hope anyone is kind enough to give me a clear step by step on solving this problem. Thanks Sounds like a permissions problem, try this link for a couple of fix's Burl Hi Burl I have just solve thi...

Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\TIMETRACKER.MDF" because the database is read-only.
This site is ready to run! No changes are needed. Press CTRL+F5 to run the site.Its not realy. It's definitely clear that this is NOT a 'ready to run' app!It cannot run scripts for a standard install on SQL 2005, but rather depends on SQL Express!?  Very tuff job trying to get this set up. And even harder to find answers to config questions.So far, I have installed/uninstalled the data bases and app 2x, the results are the same on my XP Pro box.  I keep getting an error message from DAL/DataAccess telling me it can't find the 'Issue_Tracker database connection string!! I am cluel...

Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only.
I'm new to ASP.NET (I normally work with Windows Forms) and have installed the Club Website Starter Kit. I created an Administrators role and a user called "admin". When I run the project locally, everything works as it should - I can log in as admin and I can create new users. I then copied the site to localhost (C:\Inetpub\wwwroot), but when I run the site from localhost, I can't log in (as admin or any other user); instead I get a message that says, "Your login attempt was not successful. Please try again." Also, I can't create a new user. When I try, I get the following error: Server ...

Please Help me:SQL statement failed: (-301) Internal database error ??? -- transaction rolled back SQL statement failed: (-101) Not connected to a database
Hi all, I am using Adaptive Server Anywhere 8 version I am able to sync successfully between 2 desktops with the same version. When I am trying to sync with my pocket pc device version 8.0.4122, Towards the end of Synchronization (nearly 95% completed) ,I am getting this error "E. 05/29 19:28:31. SQL statement failed: (-301) Internal database error ??? -- transaction rolled back E. 05/29 19:28:31. SQL statement failed: (-101) Not connected to a database" The log file contains E. 05/29 19:28:31. SQL statement failed: (-301) Internal database er...

Failed to update database "C:\INETPUB\WWWROOT\LOGIN\APP_DATA\ASPNETDB.MDF" because the database is read-only.
This is the Error i am getting when i user the login controls in ASP.NET 2.0When i run the same on the visual studios inbuilt web server its run perfectly fine.but when i transfer the files to IIS wwwroot any page which has to do with the LOGIN\APP_DATA\ASPNETDB.MDF gives a read-only errorI have checked the permissions and properties and it has all the access on IISI have sql server 2000 and i am also using the SQL server 2005 CTPwhat could be the issue??THANKS I+N ADVANCE A member of the ASP.NET Team posted the solution here: Darrell Norton, MV...

Failed to update database "C:\INETPUB\WWWROOT\MH\APP_DATA\Abc.MDF" because the database is read-only.
 I have created one web site having update and editing enabled but while updating i mgetting this error pls help me out this works in vs 2008 means at localhost and in IIS it gives  error only while updating and inserting data  you need to give the mdf file at c:\inetpub\wwwroot\mh\app_data\abc.mdf read/write permission to the aspnet user, you can do this by navigating to that location and then right clicking and selecting properties. From there goto security and modify the permissions.   ~P I already tried this thing but unfortunately it's not worki...

System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF" because the database is read-only
Hello, I'm doing some tests with and all works fine in the development environment (Visual Studio 2005), but as soon i publish my WebSite to my local server the errors come in hundreds. My first problem is about security: i have a login.aspx page with a recoverypassword control. In Visual Studio i can log to the site, put my login name and password and it all goes fine. If i try the recoverypassword control it works fine to: i put my login name, answer the question, and in a few seconds i receive an email with my password. Then i publish the site, i use the 'Publish We...

DataSet rows being deleted, but after the update , the sql database is not updated. The delete rows still in the database.
 Stepping thru the code with the debugger shows the dataset rows being deleted.   After executing the code, and getting to the page presentation. Then I stop the debug and start the page creation process again ( Page_Load ).    The database still has the original deleted dataset rows. Adding rows works, then updating works fine, but deleting rows, does not seem to work.   The dataset is configured to send the DataSet updates to the database. Use the standard wizard to create the dataSet.     cDependChildTA.Fill(cDependChildDs._ClientDependentC...

How can I update a SQL database with an Access database
I need to update an SQL database with an access database that is built on queries.  I need to do this nightly.   Can someone explain how to write the query for this and then I could add it to my nightly maintenance.   Thank you DeeDarlene D. you can reference your Sql Database through Access either with linked tables or ADO.  As long as you have update rights on the Sql Tables, you can use your Access queries to update the Sql tables.Good Luck and happy programming!Let's build community! If my post helped you, mark it as the Answ...

Web resources about - Failed to update database because the database is read-only -

Read-Only Memory
Read-Only Memory publishes high-quality books and articles that document defining moments in videogame history.

Read-only memory - Wikipedia, the free encyclopedia
Read-only memory ( ROM ) is a class of storage medium used in computers and other electronic devices. Data stored in ROM cannot be modified, ...

Read-Only Memory (@romalerts) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Read-Only Memory @ romalerts ...

Read Only Memories - Announcement Trailer - PS4 and PS Vita - YouTube
Coming Soon to PS4 and PS Vita Midboss is excited to announce that we're bringing the world of Neo-San Francisco to ...

Dropbox for Business folders can now be shared in read-only mode
Users of Dropbox for Business will now be able to share folders with colleagues without necessarily giving them rights to edit their content. ...

Hands-on with the Google Drive for iOS app: mostly read only
Google Drive on the iPhone. Sean Gallagher At Google's IO conference in San Francisco today, the company released a Google Drive app for Apple ...

President Obama Does Reddit AMA, Reddit Promptly Goes Into Read-Only Mode Due to Heavy Traffic
... We got a "Reddit is under heavy load right now" error page several times while trying to read the AMA, and eventually got through, but only ...

"It’s almost always a mistake to read only a first-rate writer’s masterpieces."
"A great deal of Fussell’s best, most perceptive and, frankly, most hilarious work arrived in books like 'Class: A Guide Through the American ...

Only Read This Post If You're On Your Phone
Close one eye and tilt your phone so you're looking from the charger hole. Whooaaaaaaaaa.

Only read the Facebook statuses you want to read
iPhone app Jildy says it can give users a convenient 60-second overview filtering out the statuses you won't care about.

Resources last updated: 1/2/2016 6:20:02 AM