Friday, February 24, 2012

ASPNETDB.MDF is readonly

I have downloaded and installed ASP.NET Ajax Sample applications from

http://ajax.asp.net/default.aspx?tabid=47&subtabid=471

I am trying to run the AJAX TaskList example under C:\Program\Microsoft ASP.NET\ASP.NET AJAX Sample Applications\v1.0.61025\TaskList

First I moved the content of the TaskList folder to a virtual IIS directory, making it possible to debug the website on my local IIS server.

When I run the example I get prompted to Login or register as a new user. When I submit the registration form I receive the following error message:

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

How can I modify the permissions forASPNETDB.MDF in order to run the TaskList example.

Thanks

Additional information:

I have installed SQL Server Management Studio Express as I figured this tool might help me to change the permissions. It did not help. I also tried to delete ASPNETDB.mdf, and recreate it by going Website -> Asp.net configuration by adding a new user. I still receive the same error message.

When I point the connection string to a remote SQL database of mine it is possible to register users in ASPNETDB.mdf. But I havn't figured out how to add users using a local version of ASPNETDB.mdf.

I am running Visual Studio on Windows XP. In windows XP you can't just modify permissions for folders as far as I know. I have recently installed SQL Server Management Studio Express as I said before.

I read somewhere that the read/write property for ASPNETDB.mdf may be enabled by checking a box somewhere.

But in SQL Server Management Studio Express tried the following:

*Right click on databases and click attach

*Click Add and select the database ASPNETDB.mdf

*Click OK

*Right Click on the path for ASPNETDB.mdf and click properties

When I click 'Options' under select a page Database Read-Only is already set to false.

If there is not way to use a local version of ASPNETDB.mdf (App_Data folder) I simply have to put up with my remote MS SQL 2005 database. But the subscription fee for this database is outrageous, and therefore I hope that someone might help me and everyone else by providing the appropriate steps to use ASPNETDB.mdf located to the App_Data folder, both on the local IIS server and server side.

Thanks
Svenbro

|||This can be a permission ?issue. Open Management Studio Express->connect to SQL Express instance->go to Security->Logins->make?sure the 'NT AUTHORITY\NETWORK SERVICE' account is there.|||

The 'NT AUTHORITY\NETWORK SERVICE' account is not in the list, but there is a similar item: NT INSTANS\SYSTEM

Should I add 'NT AUTHORITY\NETWORK SERVICE' as a new account with the Windows authentication property checked?

Thanks,

|||NETWORK SERVICE?is?hidden, just type it and click check name in the browse text, you should get it.

No comments:

Post a Comment