aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies


Here I will explain how to solve the problem
Failed to update database "XXXXXX\APP_DATA\DBSQAFTP.MDF" because the database is read-only during the time of publish application using


I deployed one of my website in IIS and trying to test the application during that time I got error like this

Failed to update database "XXXXXXX\APP_DATA\DBSQAFTP.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Failed to update database "XXXXXX\APP_DATA\DBSQAFTP.MDF" because the database is read-only.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[SqlException (0x80131904): Failed to update database "XXXXXX\APP_DATA\DBSQAFTP.MDF" because the database is read-only.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857418
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735030
To solve this problem I did some configuration modifications for application folder check below steps

1.       1) Right-click on the folder where you have installed your application and select Properties.

2.       2) Click on the Security tab under that click on Edit button


3.       3) Now one window will open in that click on Add button to give permission for new user


4.       4) Once we click on Add new window will open like this in that Click on Locations and make sure your machine is selected and Type ASPNET in the text box and click on Check Names. ASPNET should underline (if it doesn't, then you don't have Microsoft's .NET framework installed).   

       5) Click OK

           6) After that select the account ASPNET check the Full Control box to give it full permissions. 

           7) Click OK.

After make all the modifications my application has worked successfully. I hope it helpful for the people who is in need with this problem.  

Happy Coding………

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...

Hey, i tried to install .net framework but still when i check for name it doesn't find ASPNET

Anonymous said...

Thank You Very Much, I fix it with your help

Give your Valuable Comments

Other Related Posts

© 2010-2012 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.