`
omygege
  • 浏览: 1352871 次
文章分类
社区版块
存档分类
最新评论

VS 2010: An error occurred loading a configuration file: Failed to map the path ‘/’.

 
阅读更多

I was using the System.Web.Configuration.WebConfiguration class to open the configuration for the site from one of my logic dll’s and I got the wonderful error An error occurred loading a configuration file: Failed to map the path ‘/’.

I freaked out for a second, until I put more thought into it. This is running fine in production! What is the difference with my machine and the server?

Oh! My Visual Studio is running under UAC with limited privileges since I am in Windows 7. DUH!

So, I restarted Visual Studio 2010 under “Run as Administrator” and problem solved. So if you are on Vista or Windows 7, that’s the issue.

NOTE: If you develop with administrative rights, be careful you don’t make development mistakes that assume everyone will run your program as an admin. i.e. writing to program files directory, root directory, etc.

Happy Coding!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics