Hi
I have been learning on how to use the new features of the .NET 2.0, and Well I using VS2005 and everything is pretty straight foward. I did a Membership webform where you log in and create users and roles etc. I installed the SQL Server 2005 express as my Data provider and thats where my Tables are. I used the aspnetsql_reg comand to integrate the server to this application. Anyway my problem started when i decided to copy my project to my IIS server and well when I run the app from the Browser tells me that he Database It's set to Read-Omly and therefore it cant update it. This happens right after log in. but then I open the App. on hte VS and it runs find.
This is the error:
Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\ESPM\APP_DATA\ASPNETDB.MDF" because the database is read-only.
If anyone have any ideas I would really aprecciate.

Database is read-only.
fischere
1. Check the file attributes on the MDF to make sure its writable.
2. Make sure the user has permissions to the file.
3. Run the following query;
use master
select name, status from sysdatabases
If you are using AttachDBFilename in the connection string you will need to insert some debug code that does a debug print/console.writeline or something to get the output once the conneciton has been made and before any sql has been executed.
If you are using regular connections then just run the above from sqlcmd or express manager
Sven Loadtester
1.) Make sure your virtual directory is running ASP.NET v2.*
2.) Give the user ASPNET full control over the App_Data directory found within your website.
3.) Restart IIS to refresh its permissions.
Derek.Strickland
Chas75287
Uknow
If anyone figures this out, please let us know. I googled:
"ASPNETDB.MDF" read only
and found only THREE links on google groups, this being one of them.
I haven't tried this yet, but I'm wondering if running it locally, or administering it locally on the dev machine, then copying those modified database files up, somehow screws with it. I'm going to try creating a totally fresh personal web site, do NO config and NO running locally, copy that up to the server, then see what happens.
Mike Champion - MSFT
Thanks
Zane
dmball
Thanks
ian
MicHerz
Its probably advisable to use a real sql database anyway but for testing purposes these files aren't too bad.
Shadow Listener
Zilog8
how about you
Yogesh2810
Thanks anyway
Ian
Cool Eithen
With a bit of searching on Google I found out that this is a bug from an older release. Microsoft claimed to have fixed it in the latest release but the problem still excists :(
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=dd6d161b-df08-40bc-b9ed-fbca71949ddc
Guess we have to wait..and wait..and wait
Aman Dhingra
I have been struggling with this for the past week or so. Just as I was ready to give up and go back to VS2003 I decided to try one last thing. Now it works!
Here is the process I went through:
I first deleted my site files from c:\inetpup\wwwroot. Then using the sseutil, I detatched every database I was using for the site including the aspnetdb.mdf. I then changed the permissions on the wwwroot folder to allow full control for user aspnet (using IIS 5.1). Then from inside VS2005, I copied the site again to the root of the IIS server.
As I mentioned earlier, this finally worked for me. I hope it works for you as well.
JustKuzya
Thanks a lot!