Failed to update database "C:\BCPORTAL\APP_DATA\BCANCER.MDF" because the database is read-only.
-
Hello. I am working on a website. For now whenever I want to test it I would just run it from localhost using IIS. An error occurred after transferring the work to another laptop. Everything ran smoothly until came to the part where there is a need to update/insert data to the database. I got this error saying that I am not able to update the database because it is read-only. Now the error only occurred when I ran the website from localhost using IIS. The process of updating/inserting when smoothly when I ran the website from Visual Studio. I searched for every possible solution and found out several ones 1. Set the App_Data folder attribute to not 'Read-only'. - Done that but the folder automatically set back to 'Read-only' each and everytime. 2. Execute the following sql query
ALTER DATABASE bcancer SET READWRITE
- Done that also but still the database is in read-only mode. Can somebody help me out on this? Thank you very much for your attention.
-
Hello. I am working on a website. For now whenever I want to test it I would just run it from localhost using IIS. An error occurred after transferring the work to another laptop. Everything ran smoothly until came to the part where there is a need to update/insert data to the database. I got this error saying that I am not able to update the database because it is read-only. Now the error only occurred when I ran the website from localhost using IIS. The process of updating/inserting when smoothly when I ran the website from Visual Studio. I searched for every possible solution and found out several ones 1. Set the App_Data folder attribute to not 'Read-only'. - Done that but the folder automatically set back to 'Read-only' each and everytime. 2. Execute the following sql query
ALTER DATABASE bcancer SET READWRITE
- Done that also but still the database is in read-only mode. Can somebody help me out on this? Thank you very much for your attention.
try to assign admin role to "asp.net user" good luck. Mehdi