WCF, Service attribute value in the ServiceHost directive could not be found

后端 未结 22 1662
自闭症患者
自闭症患者 2020-12-04 17:19

I\'m trying to host my service with IIS 6 but I keep get this exception.

    Server Error in \'/WebServices\' Application.
----------------------------------         


        
22条回答
  •  甜味超标
    2020-12-04 18:14

    Double check that you're referencing the correct type from the ServiceHost directive in the .svc file. Here's how...

    1. In the VS project containing your web service, open the .svc file in the XML editor (right-click the file, Open With..., choose XML (Text) Editor, OK).
    2. Note the "Service" attribute value.
    3. Make sure it matches the fully qualified type name of your service. This includes the namespace + type name. For example, if the namespace is "MyCompany.Department.Services" and the class is called "MyService", then the Service attribute value should be "MyCompany.Department.Services.MyService".

提交回复
热议问题