开发者

WebServiceHost2Factory does not load wsdl file

My Rest wcf was开发者_运维百科 working perfectly until I installed WCF REST Starter Kit Preview 2. I have added WebServiceHostFactory2 in the service Host Markup as mentioed below.

<%@ ServiceHost Language="C#" Debug="true" Service="wcf.Service1" 
    CodeBehind="Service1.svc.cs" Factory="Microsoft.ServiceModel.Web.WebServiceHost2Factory" %>

When I try to view my service in the browser I am getting the following error.

"Error Description: 'Resource does not exist' This may be because an invalid URI or HTTP method was specified. Please see the service help page for constructing valid requests to the service."

I cant see my wsdl file also.

But when I run my service from Rest Client its working fine. I am able to successfully POST data to my Rest Wcf Service.

If I remove the "Factory="Microsoft.ServiceModel.Web.WebServiceHost2Factory" from ServiceHost I can see the wsdl file in the browser.

I have added WebserviceHost2Factory for effective error handling, so I cant remove it. I really don't understand what mistake I am doing here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜