Tuesday, February 22, 2011

IIS Configuration Error Error: Cannot write configuration file due to insufficient permissions

While deploying my custom asp.net application I found it hard to browse through few asp.net pages. I tried to enable directory browsing feature to locate pages. Selecting enabled after clicking on directory browsing gaves me following error

Error: Cannot write configuration file due to insufficient permissions

Looking at above issue I thought that may be I need to start my IIS as an administrator so I closed my IIS and start IIS console again as an administrator but above error remain as is.

I decided to go for some research over the internet and found an unbelievable solution. i.e. My web.conf file was readonly :D.

9 comments:

  1. You nailed it, thanks!

    ReplyDelete
  2. Thank you! Solved my problem :-)

    ReplyDelete
  3. great! thank you!

    ReplyDelete
  4. Perfect! Unfortunately, I had already spent 2+ hours before I came across this thread! As a side, the error message should simply state the file is read-only:-| Thanks.

    ReplyDelete
  5. I almost got frustrated with my IIS problem, until I found your blog .. thank you for sharing ..

    ReplyDelete
  6. Great job. Me too had already spent about 2 hours on this before finding your solution. It's silly of me as I should have noticed it!

    ReplyDelete
  7. My web.config was not read-only. But I solved it by taking away ownership from TrustedInstaller and giving it to the domain administrator, then giving the Administrators group full permissions on the web.config file.

    ReplyDelete