I was getting below error when trying to Open the web.config file using WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath on the development machine.
Exception Details: System.InvalidOperationException: Failed to map the path '/'. Solution:
There might be other solution of this problem as well, few says to register the IIS and ASP.NET or add network permission etc.etc. that might work as well. For me at the development machine, I started the Visual Studio 2010 as Administrator (Run as Administrator) and executed the app and it worked for me.