.Net, ASP.NET, IIS, IIS8, Programming, Web Development, Web Server

IIS: Cannot Write Configuration File due to Insufficient Permissions

I was setting up an ASP.NET application in IIS 8 when this error message all of a sudden popped up:

Error: Cannot Write Configuration File due to Insufficient Permissions

I wasn’t sure what was going on at first… why was IIS saying it didn’t have the right level of permissions to write to a file? I couldn’t continue with the site setup since I was unable to change the default document settings in IIS or the .NET Authorization rules. The error would just keep showing.

I started trying to adjust all sorts of permissions before I realized: wait a second… could the ReadOnly setting be toggled on the Web.config file?

And that was exactly the problem. The Web.config file had been set to read-only. As soon as I clicked the read-only toggle off on this file, I was able to continue changing the settings that I needed to get the site up and running in IIS.

It would be nice if some of these Microsoft error messages could be more exact as to what problem is happening. This error had me wondering about permissions settings in the Web site folder/files, while the actual issue was a simple read-only setting on the Web.config file. If you ask me, Microsoft should just set this error as:

Error: Cannot Write to Configuration File due to Read-Only being set to true

There, isn’t that much clearer? The problem and the actual solution in one simple error message

 

Advertisement

5 thoughts on “IIS: Cannot Write Configuration File due to Insufficient Permissions”

  1. The thread is old…but I want to point out that there is a “flip side”….from a security standpoint giving out ANY information about why an operation failed increases risk…

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 )

Facebook photo

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

Connecting to %s