VS 2010: An error occurred loading a configuration file: Failed to map the path ‘/’.
2011-02-20 21:41
991 查看
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!
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!
相关文章推荐
- eclipse怎么解决Failed to load the JNIshared library、an error has occurred.see the log file
- 上传app到app store遇到 An error occurred uploading to the iTunes Store.(iTunes Store Operation Failed)的解决方法
- an error has occurred while trying to access the log file. logging may not function properly
- error : A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be ext
- eclipse 出现An error has occurred. See the log file f:\eclipse\configuration\的解决办法
- An error occurred during local report processing.Failed to load expression host assembly. Details: Request for the permission of
- 强制关机 VMware Wrokstation Error (failed to get exclusive lock on the configuration file----)
- cent OS 6开机出现an error occurred during the file system check dropping you to a shell
- Eclipse启动时提示An error has occurred.See the log file D:\eclipse\configuration\...
- Error occurred in deployment step 'Add Solution': Failed to extract the cab file in the solution
- 提交到app store遇到checksum validation failed和an ssl error has occurred and a secure connection to the se
- Xcode 9: An error occurred uploading to the iTunes Store. iTunes Store Operation Failed
- an error has occurred while trying to access the log file. logging may not function properly
- An error occurred during the execution of xp_cmdshell. A call to 'LogonUserW' failed with error code: '1385'
- 启动时出现错误an error occurred during the file system check dropping you to a shell
- [置顶] GENYMOTION问题之an error occurred while deploying a file install_failed_no_machine_abis
- Eclipse的启动问题【an error has occurred see the log file】
- NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be mad
- spark在windows下运行报错ERROR Shell: Failed to locate the winutils binary in the hadoop binary path
- VS2010 error: LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt