允许在 .NET 4.0 中使用 WCF 无文件激活进行调试

发布于 2024-09-30 02:26:25 字数 495 浏览 0 评论 0原文

我一直在 .net 4 中测试新的 WCF 无文件激活内容,它允许您使用配置而不是使用物理 svc 文件。

我的 web.config 的相关部分如下所示:

<serviceHostingEnvironment>
      <serviceActivations>
        <add relativeAddress="Service1.svc" service="WcfService1.Service1" factory="WcfService1.UnityServiceHostFactory" />
      </serviceActivations>
    </serviceHostingEnvironment>

运行正常,但如果我添加任何断点,它们不会被命中。使用 svc 文件时,它们在标记中具有 debug="true",但我不知道如何在通过配置执行此操作时允许这样做。

有什么想法吗?

I have been testing out the new WCF fileless activation stuff in .net 4 that allows you to use config rather than having a physical svc file.

The relevant part of my web.config looks like this:

<serviceHostingEnvironment>
      <serviceActivations>
        <add relativeAddress="Service1.svc" service="WcfService1.Service1" factory="WcfService1.UnityServiceHostFactory" />
      </serviceActivations>
    </serviceHostingEnvironment>

This runs ok but if I add any breakpoints, they do not get hit. When using svc files, they have debug="true" in the markup but I do not know how to allow this when doing it through config.

Any ideas?

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

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

发布评论

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

评论(1

や三分注定 2024-10-07 02:26:25

哎呀。看来我错了。在被要求做其他事情一段时间后,我重新审视了这段代码,它似乎工作正常。普通 svc 文件中的调试标志实际上不执行任何操作。

Oops. It seems as though I was mistaken. After being called on to something else for a while, I have revisited this code and it appears to be working normally. The debug flag in normal svc files doesn't actual do anything.

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