相关疑难解决方法(0)

AddressFilter在EndpointDispatcher上不匹配 - 带有To的消息

任何想法我如何纠正这个...通过js调用服务

由于EndpointDispatcher上的AddressFilter不匹配,无法在接收方处理带有"http://MySite.svc/GetStateXML"的消息.检查发送方和接收方的EndpointAddresses是否一致

谢谢

wcf

42
推荐指数
5
解决办法
8万
查看次数

由于EndpointDispatcher上的AddressFilter不匹配,无法在接收器处理

我正在使用启用了Ajax的WCF,当我在网络浏览器中打开网址时,我收到此错误.

由于EndpointDispatcher上的ContractFilter不匹配,因此无法在接收方处理具有Action'http:// localhost:22219/MobileService.svc/GetProductCategories ' 的消息.这可能是由于合同不匹配(发送方与接收方之间的操作不匹配)或发送方与接收方之间的绑定/安全性不匹配.检查发送方和接收方是否具有相同的合同和相同的绑定(包括安全要求,例如消息,传输,无).

MobileService代码如下

namespace MobileService
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class MobileService
    {
        // To use HTTP GET, add [WebGet] attribute. (Default ResponseFormat is WebMessageFormat.Json)
        // To create an operation that returns XML,
        //     add [WebGet(ResponseFormat=WebMessageFormat.Xml)],
        //     and include the following line in the operation body:
        //         WebOperationContext.Current.OutgoingResponse.ContentType = "text/xml";
        [OperationContract]
        public void DoWork()
        {
            // Add your operation implementation here
            return;
        }
        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, …
Run Code Online (Sandbox Code Playgroud)

asp.net wcf asp.net-ajax wcf-binding c#-4.0

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

wcf ×2

asp.net ×1

asp.net-ajax ×1

c#-4.0 ×1

wcf-binding ×1