如何使动态 Web 引用的 URI 在 web.config 而不是 app.config 中查找?

发布于 2024-08-31 05:20:42 字数 152 浏览 1 评论 0原文

我有一个类库(DLL),它有一个动态的网络引用。

我已将该设置复制到 web.config 的 applicationSettings 中,但它仍然引用我在开发过程中设置的旧 URI。

知道如何让它从 web.config 获取 Web 服务的 URI 吗?

I have a class library(DLL) which has a web reference, its dynamic.

I have copied the setting into the applicationSettings of the web.config but still it keeps referring to the old URI I had set during develoment.

any idea how i can make it take the URI of the web-service from the web.config?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

莫言歌 2024-09-07 05:20:42

如果您在 Web 应用程序中运行,则无法从 app.config 获取值。您可能看到的是默认值,而不是 app.config 中的配置值。

要查看这一点,请更改 app.config 中的值并查看服务是否选择它。

There is no way that it's taking the value from app.config if you're running in a web application. You are probably seeing the default value, not the configured value in app.config.

To see this, change the value in app.config and see if the service picks it up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文