如何调试这个WCF错误?

发布于 2024-10-07 07:38:39 字数 194 浏览 0 评论 0原文

出现此错误:

无法找到作为 ServiceHost 指令中的 Service 属性值提供的类型“MyCompany.MyNameSpace.MyType”。

尝试运行或引用服务项目时, 解决这个问题吗?

编辑: 这是在 vs 2008 cassini 的 buit 下运行时的情况。

When trying to run or reference the service project I get this error:

The type 'MyCompany.MyNameSpace.MyType', provided as the Service attribute value in the ServiceHost directive could not be found.

Where to look to fix this?

Edit:
This is while running under the buit in vs 2008 cassini.

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

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

发布评论

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

评论(3

橘虞初梦 2024-10-14 07:38:39

该错误消息意味着无法加载指定为服务类型的类型。可以使用 Fusion 加载程序日志来调试类型加载问题。 请参阅此处获取详细说明

The error message means that the type specified as the Service type couldn't be loaded. Type loading problems can be debugged using the Fusion loader log. See here for a good explanation.

千柳 2024-10-14 07:38:39
  • 检查您的 svc html 文件中的标记:<%@ ServiceHost Language="C#" Debug="true" Service="Service" CodeBehind="~/App_Code/Service.cs" %>

  • 如果在 IIS 中明确设置,请确保虚拟文件夹是 Web 应用程序

  • 您可以通过允许我将您链接到我的博客文章来启用 WCF 跟踪因为我很邪恶,想要为我的网站带来更多流量,这才是最重要的:)
    http://jtstroup.net/post/Wcf-Tracing.aspx
  • Check your svc html file for the tag: <%@ ServiceHost Language="C#" Debug="true" Service="Service" CodeBehind="~/App_Code/Service.cs" %>

  • If explicitly setup in IIS make sure the virtual folder is a web application

  • You can enable WCF tracing by allowing me to link you to my blog post because I am evil and want to generate more traffic to my website to be all important :)
    http://jtstroup.net/post/Wcf-Tracing.aspx
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文