I have a web project in VS.NET 2005 on my development computer that uses an ASP.NET database (ASPNETDB.MDF) to manage user roles. Now I would like to move that database to a test computer with IIS. After copying the web project and database I am able to read from it but when I try to update I get the following error:
Failed to update database "C:\INETPUB\WWWROOT\MyWebApp\APP_DATA\ASPNETDB.MDF" because the database is read-only.
I think this is because the user 'Network Service' that IIS uses does not have access to the database. So how do I give 'Network Service' access to the database using SQL commands?
The problem is solved by closing VS.NET 2005 before moving the database and giving the user 'Network Service' full control to the database files.
No comments:
Post a Comment