未处理EndpointNotFoundException [英] EndpointNotFoundException was unhandled

查看:98
本文介绍了未处理EndpointNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在http://localhost:4753/Service1.svc上没有侦听终结点的端点可以接受该消息.这通常是由不正确的地址或SOAP操作引起的.有关更多详细信息,请参见InnerException(如果存在).

我检查了我的ServiceReference.ClientConfig

There was no endpoint listening at http://localhost:4753/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

I had check my ServiceReference.ClientConfig

<configuration>
    <system.servicemodel>
        <bindings>
            <basichttpbinding>
                <binding name="BasicHttpBinding_IService1" maxbuffersize="2147483647">
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basichttpbinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:4753/Service1.svc" binding="basicHttpBinding">
                bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
                name="BasicHttpBinding_IService1" />
        </endpoint></client>
    </system.servicemodel>
</configuration>



我将一个数据添加到sql server之后,发生了错误(粗体字体).



The error(bold font) occur is after i add one data into sql server.

public System.Collections.ObjectModel.ObservableCollection<meetpoint_b2c.servicereference1.suppcatalogue> EndGetProductData(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<meetpoint_b2c.servicereference1.suppcatalogue> _result = ((System.Collections.ObjectModel.ObservableCollection<meetpoint_b2c.servicereference1.suppcatalogue>)(base.EndInvoke("GetProductData", _args, result)));</meetpoint_b2c.servicereference1.suppcatalogue></meetpoint_b2c.servicereference1.suppcatalogue>
                return _result;
            }</meetpoint_b2c.servicereference1.suppcatalogue>

推荐答案

在服务器端未配置任何端点时,可能会发生这种情况.


当您发送到服务器的数据不同时,可能会发生这种情况.

尝试确保发送到服务器的方法参数的类型与合同相同.
如果尝试发送object []而不是string [],则可能会发生这种异常.
This can happen when there is no end point configured at serverside.

OR

It can happen when the data that you send to server differ.

Try to make sure that the type of method parameter that you send to server is same as your contract.
If you try to send object[] instead of string[] such exception can happen.


这篇关于未处理EndpointNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆