简体   繁体   中英

How to debug this WCF error?

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?

This is while running under the buit in vs 2008 cassini. 这是在vs 2008 cassini的buit下运行。

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 .

  • 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM