不在独立的exe内部运行时必须指定exePath。 [英] exePath must be specified when not running inside a stand alone exe.

查看:218
本文介绍了不在独立的exe内部运行时必须指定exePath。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Web应用程序时,下面的代码行

配置objConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
类库中的
给出了这个错误。不能在独立的exe内部运行时指定exePath。以前正在使用控制台应用程序,代码可以访问app.config。我尝试在类库中使用System.Web.Configuration但是.Net选项卡中没有添加引用的dll。请帮助

When i am using a web application, the line of code below
Configuration objConfig = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None);
in class library are giving this error."exePath must be specified when not running inside a stand alone exe." Previously a console application was being used, and the code could access the app.config. I tried using the System.Web.Configuration in class library but the dll was not present in the .Net tab for "Add reference". Kindly help

推荐答案

参见 这个 [ ^ ]回答。



/ ravi
See this[^] answer.

/ravi


这篇关于不在独立的exe内部运行时必须指定exePath。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆