允许在 .NET 4.0 中使用 WCF 无文件激活进行调试
我一直在 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哎呀。看来我错了。在被要求做其他事情一段时间后,我重新审视了这段代码,它似乎工作正常。普通 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.