配置 ASMX Web 服务端点 - web.config

发布于 2024-08-25 18:32:20 字数 422 浏览 4 评论 0原文

我在单独的程序集 TestProj.Core 中设置了对 2 个 Web 服务的引用。 我在名为 TestProj.Web 的 Web 应用程序项目中引用了该项目。

当我在 TestProj.Core 中设置引用时,向导给了我一个 app.config 并通过应用程序设置部分进入其中。

如何将这些设置添加到我的网络应用程序中?将它们复制并粘贴到 web.config 中? “始终将 app.config 复制”到 bin 目录?有没有关于多重配置的好文章?

更新:
当我将其复制并粘贴到 web.config 的 applicationSettings 中时,调试时出现错误 -
无法识别的配置部分 applicationSettings/TestProj.Core.Properties.Settings。

I have set up references to 2 web services in a separate assembly TestProj.Core.
I reference this Project in a Web Application Project called TestProj.Web.

When I setup the references in TestProj.Core the wizard gave me an app.config and through an application settings section into it.

How do I get these settings to my web app? Copy and paste these into web.config? "Always Copy" the app.config out to the bin directory? Any good articles on mutiple configs?

UPDATE:
When I copy and paste it into the applicationSettings of the web.config, I get an error when I debug -
Unrecognized configuration section applicationSettings/TestProj.Core.Properties.Settings.

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

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

发布评论

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

评论(1

中二柚 2024-09-01 18:32:21

复制和粘贴是对单独程序集中的任何 app.config 执行此操作的唯一方法。

Copy and paste is the only way to do it for any app.config in a separate assembly.

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