It's a bug...
See :
http://lab.msdn.microsoft.com/produc...d-fbca71949ddc
Here's the workaround suggested by Microsoft :
1. Delete the MDF/LDF files from the App_Data directory of the website under
inetpub\wwwroot.
2. Download and install the SSEUTIL command line tool from:
http://www.microsoft.com/downloads/d...displaylang=en
3. Using sseutil, issue a command that looks something like:
sseutil -child "NT AUTHORITY\NETWORK SERVICE" -detach D:\
You will need to change the account name and the detach path to match your
machine settings. If on IIS5/5.1, then ASPNET will be the correct user account.
Also, you can determine the detach path pretty easily by issuing sseutil -list to see
where the problematic MDFs are currently attached. The "D:\" in the sample
command line is just the first few characters that sseutil uses to auto-detach all
databases that begin with "D:\". Change the path as neeeded for your machine.
4. Set the ACLs on App_Data directory under inetpub\wwwroot to grant R/W
to the appropriate process account - NETWORK SERVICE on WS03
or ASPNET on IIS5/5.1.
5. Re-copy the MDF/LDF files from the directory where the file-based website
exists back into App_Data under inetpub\wwwroot. After the copy occurs,
check that the MDF/LDF files have now inherited the new ACLs.
6. Re-run the application (ignore any connection errors that might occur
- just hit refresh in the browser).
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
ASPNETFAQ.COM :
http://www.aspnetfaq.com/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"mike" <so**********@gmail.com> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Failed to update database "D:\INETPUB\WWWROOT\ADROUTER\APP_DATA\ADROUTER.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:\INETPUB\WWWROOT\ADROUTER\APP_DATA\ADROUTER.MDF " because the database is read-only.
Source Error: