Sunday, November 23, 2008

Error Message :

Failed to update database "D:\HOHRMIS\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 "D:\HOHRMIS\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Cause of the problem :

when we move the project from the inetpub default folder to some other location we will get this error , this is due to the read / write rights .

Solution :

  • Detach the database
  • Give read / write access to the APP_DATA folder
  • Attach the database then run it

No comments: