`
zhangziyueup
  • 浏览: 1164482 次
文章分类
社区版块
存档分类
最新评论

solution:Failed to update database "XXX.MDF" because the database is read-only.

 
阅读更多

As usual I did Build - Publish Web Site and then copied and pasted the published directory to my web server. When browsing any of the web pages that use the SQL Server 2005 database I get this error message: Failed to update database "XXX.MDF" because the database is read-only.

Solution:

This worked for me:
1) Make sure App_Data directory or any contained files does not have file system attribute Read-only set. (I had some files marked as Read-only)
2) Give user ASPNET and NETWORK SERVICE Modify control over the App_Data directory. (I had to add both these)
3) Run IISRESET to restart IIS to refresh its permissions.

and step 2 works here:

after selecting "properties on the "App_Data"directory,

1. Select the security tab

2. CLick on Add... under "Groupor User names:" table

3. On the next window, select Advanced, another window appears and on this, selectorrather click on "find now" and a list of Groups and Users should appear on the bottom table.

4. Click on ASPNET followed by OK, and the same on the next 2 windows.

分享到:
评论

相关推荐

    struts2.3.12GA(HTML版)

    The Apache Struts web framework is a free open-source solution for creating Java web applications. Use the links below to download a release of Apache Struts from one of our mirrors. You can verify ...

    EurekaLog_7.5.0.0_Enterprise

    Run-time package (EurekaLogCore) is copied to Windows\System32 folder. Refer to help for more info. 2)....Added: RAD Studio 10.1 Berlin support 3)....Added: IDE F1 help integration (on CHM-based IDEs...

    Cisco.Press.Cisco.CallManager.Fundamentals.A.Cisco.AVVID.Solution.2nd.Edition.Sep.2005.eBook-DDU

    Cisco.Press.Cisco.CallManager.Fundamentals.A.Cisco.AVVID.Solution.2nd.Edition.Sep.2005.eBook-DDU

    Apress.Java.9.Recipes.A.Problem-Solution.Approach.3rd.Edition.2017

    Apress.Java.9.Recipes.A.Problem-Solution.Approach.3rd.Edition.2017

    Three-dimensional hybrid implicit–explicit

    step in this method is only determined by the space discretisations in the radial and vertical directions. The numerical stability of the proposed HIE–FDTD method is presented analytically. Compared ...

    XLSReadWriteII.v.5.20.67.D7.D2010-XE10.rar

    XLSReadWriteII.v.5.20.67.D7.D2010... At that time it was the only component that could read and write Excel 97+ files. We are commited to have the leading Excel solution for Delphi in the future as well.

    TR6260 DATASHEET802.11b/g/n Wi-Fi Single Chip Beijing Eswin Tech

    The SoC is a 2.4GHz IEEE 802.11b/g/n Wi-Fi single chip solution with standard security features. With optimized power and RF performance, robustness, versatility, reliability, various power profiles...

    ASP.NET 3.5 Website Programming: Problem - Design - Solution

    Chapter 1: Introducing the Project: TheBeerHouse . . . . . . . . . . . . . . . . . . . . . 1 Chapter 2: Developing the Site Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Chapter...

    Python安装包version 3.1.5

    If a message is printed about a failed test or a traceback or core dump is produced, something is wrong. On some Linux systems (those that are not yet using glibc 6), test_strftime fails due to a non-...

    Hive - A Warehousing Solution Over a Map-Reduce.pdf

    The size of data sets being collected and analyzed in the industry for business intelligence is growing rapidly, mak- ing traditional warehousing solutions prohibitively expen- sive. Hadoop [3] is a ...

    Java.7.Recipes.A.Problem-Solution.Approach

    Java.7.Recipes.A.Problem-Solution.Approach,.Josh.Juneau,.Carl.Dea,.Freddy.Guime,.John.O'Conner,.Apress,.2012

    ZLIBdll+Demo源码

    FlexCompress.NET is an advanced compression and encryption .NET component designed to provide archive functionality for your applications. This solution provides flexible compression and strong ...

    PHP.and.MySQL.Recipes.A.Problem-Solution.Approach.1484206061

    PHP and MySQL Recipes: A Problem-Solution Approach supplies you with complete code for all of the common coding problems you are likely to face when using ... This invaluable guide includes over 200 ...

    UniWebView+3.unitypackage.zip

    Please check the place you have purchased this asset to see whether there is an update or not. A release note is also contained in this asset, in the "CHANGELOG.md" file. You could also find the same...

    The Indispensable PC Hardware Book - rar - part1. (1/7)

    solution to all your hardware questions. Even beginners should not shy away as this book begins with an easy introduction to the subject area. Key highlights: l CPU's from the 8086/8088 to the ...

    Unlocker 2.1.1 vmware装最新OSX解锁程序

    Thanks also to Sam B for finding the solution for ESXi 6 and helping me with debugging expertise. Sam also wrote the code for patching ESXi ELF files and modified the unlocker code to run on Python 3 ...

    unlocker211

    Thanks also to Sam B for finding the solution for ESXi 6 and helping me with debugging expertise. Sam also wrote the code for patching ESXi ELF files and modified the unlocker code to run on Python 3 ...

    mimikatz,ms14068

    mimikatz is in the form of a Visual Studio Solution and a WinDDK driver (optional for main operations), so prerequisites are: - for mimikatz and mimilib : Visual Studio 2010, 2012 or 2013 for Desktop...

    cJSON-master.zip

    Because the entire library is only one C file and one header file, you can just copy `cJSON.h` and `cJSON.c` to your projects source and start using it. cJSON is written in ANSI C (C89) in order to...

Global site tag (gtag.js) - Google Analytics