Exception Details: System.Data.SqlClient.SqlException: Failed to update database.

i would like to share my experience with you all because when you started working with SQL Server Express 2005 you have to encounter probelms like one of which am i going to explain you in this blog entry: hopes it will helps you to not to search it for the same problem throughout days or months, as i have to search it for the solution for many days!

Exception Details: System.Data.SqlClient.SqlException: Failed to update database “c:\hosting\webhost4life\member\abc23\aba\LatestABAWebsite\App_Data\aspnetdb.mdf” because the database is read-only.

This will happen mainly coz of the folder permission that we have to apply for the App_data folder: so to rectify this problem you have to follow these steps:

After selecting the ‘properties’ on the “App_Data” directory,

1. Select the security tab
2. CLick on Add… under “Group or User names:” table
3. On the next window, select Advanced, another window appears and on this, select or rather 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.

if you need to enable the security tab in Windows XP Professional you have to uncheck the setting for “Use simple file sharing (recommended)” under the View tab in the Folder Options control panel applet to enable the Security tab to be displayed. after that you can be able to view the security tab when you viewed any folder properties.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: