Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Failed to update database "C:\BCPORTAL\APP_DATA\BCANCER.MDF" because the database is read-only.

Failed to update database "C:\BCPORTAL\APP_DATA\BCANCER.MDF" because the database is read-only.

Scheduled Pinned Locked Moved ASP.NET
databasehelpcsharpvisual-studiowindows-admin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ceiral
    wrote on last edited by
    #1

    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.

    K 1 Reply Last reply
    0
    • C ceiral

      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.

      K Offline
      K Offline
      kadaoui el mehdi
      wrote on last edited by
      #2

      try to assign admin role to "asp.net user" good luck. Mehdi

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups