没有端点监听...可以接受该消息。 [英] There was no endpoint listening at... that could accept the message.

查看:99
本文介绍了没有端点监听...可以接受该消息。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jquery / Ajax在Asp.Net中开发了一个应用程序。对于数据库通信和复杂的逻辑,我有WCF服务。我已将该服务添加为Web应用程序中的服务引用。当我把这个项目带到现场时,我遇到了一个奇怪的问题。



大部分时间网站运行顺利。有时,它会抛出以下错误并且网站会崩溃。



http://www.example.com/All上没有端点收听.svc可以接受消息。这通常是由不正确的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)。

服务器堆栈跟踪:在System.ServiceModel.Channels.HttpOutput位于System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(消息消息,TimeSpan超时)的System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)中的.WebRequestHttpOutput.GetOutputStream()位于System.ServiceModel.Channels.RequestChannel。 System.ServiceModel.Channels.ServiceChannelProxy上System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)的请求(消息消息,TimeSpan超时)。 InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)在[0]处重新抛出异常:位于System.Runtime.Remoting.Proxies.RealProxy的System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)。 PrivateInvoke(MessageData&安培; msgData,Int32类型)位于SiteSetting的ServiceReference2.IAll.GetBasicInformation(Stream strmdata).SetSiteBasicSetting()




如果您对此问题有任何需求,请加注你需要。

请尽快帮助我。任何帮助将不胜感激。





------------仅从客户代码消费服务 - ----------------------------------



I have developed an application in Asp.Net with jquery/Ajax. for database communication and complex logic, i have WCF Service. I have added the service as Service Reference in Web Application. When i made this project live, i stuck with a strange problem.

Most of time website is running smoothly. and sometime, it throws this below error and website gets down.

"There was no endpoint listening at http://www.example.com/All.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Server stack trace: at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at ServiceReference2.IAll.GetBasicInformation(Stream strmdata) at SiteSetting.SetSiteBasicSetting()


if you need anything regarding this issue, raise you need.
Please help me asap. any help will be appreciated.


------------Just from Client code to consume service-----------------------------------

XDocument miXML = new XDocument(
         new XDeclaration("1.0", "utf-8", "yes"),
         new XElement("GetHomeDetails",
         new XElement("GetHomeDetails",
         new XElement("ClientId", SiteConstant.GetClientID),
         new XElement("IPAddress", SiteConstant.IPAddress),
         new XElement("SessionKey", SiteConstant.GetSessionID),
         new XElement("APIKey", SiteConstant.APIKey),
         new XElement("APIPassword", SiteConstant.APIPassword)
        ))

      );

        byte[] bytes = System.Text.Encoding.Default.GetBytes(miXML.ToString());
        ServiceEndUsers.EndUsersClient objService = new ServiceEndUsers.EndUsersClient();

       XmlDocument xDoc = new XmlDocument();
        xDoc = objService.GetHomeDetails(bytes);





上面的粗线抛出错误。



--------------服务代码服务合同/运营合同如下--------- --------



[OperationContract(Name =GetHomeDetails)]

Stream GetHomeDetails(Stream strmdata );






-------------服务配置----- --------







The above bold line throwing error.

--------------In Service code Service contract/Operation contract is as below-----------------

[OperationContract(Name = "GetHomeDetails")]
Stream GetHomeDetails(Stream strmdata);



-------------Service Configuration -------------


<system.serviceModel>
   <bindings>
     <basicHttpBinding>
       <binding name="BasicHttpBinding_IEndUsers"/>
     </basicHttpBinding>
   </bindings>
   <client>
     <endpoint address="http://www.example.com/EndUsers.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IEndUsers" contract="ServiceEndUsers.IEndUsers" name="BasicHttpBinding_IEndUsers"/>
   </client>
   <behaviors>
     <serviceBehaviors>
       <behavior name="">
         <serviceMetadata httpGetEnabled="true"/>
         <serviceDebug includeExceptionDetailInFaults="false"/>
       </behavior>
     </serviceBehaviors>
   </behaviors>
   <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
 </system.serviceModel>





--------------我的客户端配置--------------------------------- ---







--------------My Client Configuration------------------------------------


<system.web>
    <customErrors defaultRedirect="pagenotfound" mode="On" redirectMode="ResponseRedirect"></customErrors>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
    <authentication mode="Forms">
      <forms loginUrl="loginregister" timeout="2880"/>
    </authentication>
    <pages>
      <controls>
        <add tagPrefix="Ajax" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
       
      </controls>
    </pages>
    <httpRuntime executionTimeout="3600" maxRequestLength="102375"></httpRuntime>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
      </providers>
    </roleManager>
  </system.web>

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
    </handlers>
    <httpErrors errorMode="DetailedLocalOnly">
      <remove statusCode="404" subStatusCode="-1"/>
      <error statusCode="404" prefixLanguageFilePath="" path="/pagenotfound" responseMode="ExecuteURL"/>
    </httpErrors>
    <defaultDocument enabled="true">
      <files>
      </files>
    </defaultDocument>
    <directoryBrowse enabled="false"/>
  </system.webServer>











我想再次提醒,我的网站通常运行良好。只有一段时间,这是投掷错误。这对我来说似乎很奇怪。



谢谢。



-------- -------------------------------------------------- ----------------------------------



我对WCF配置没什么经验。如果有多个端点如此重要:










I would like remind once again, my website usually running well. only some time, it is throwing error. it seems totally strange to me.

thank you.

--------------------------------------------------------------------------------------------

I have little experience on WCF configuration. Does it matter if have multiple endpoints like:


<system.servicemodel>
    <bindings>
      <basichttpbinding>
 
        <binding name="BasicHttpBinding_INews" maxreceivedmessagesize="214748364" />
        <binding name="BasicHttpBinding_IPurchase" maxreceivedmessagesize="214748364" />
 
      </basichttpbinding>
    </bindings>
    <client>
      <endpoint address="http://www.example.com/News.svc" binding="basicHttpBinding" bindingconfiguration="BasicHttpBinding_INews" contract="ServiceNews.INews" name="BasicHttpBinding_INews" />
      <endpoint address="http://www.example.com//Purchase.svc" binding="basicHttpBinding" bindingconfiguration="BasicHttpBinding_IPurchase" contract="ServicePurchase.IPurchase" name="BasicHttpBinding_IPurchase" />
    </client>
    <behaviors>
      <servicebehaviors>
        <behavior name="">
          <servicemetadata httpgetenabled="true" />
          <servicedebug includeexceptiondetailinfaults="false" />
        </behavior>
      </servicebehaviors>
    </behaviors>
    <servicehostingenvironment multiplesitebindingsenabled="true" />
  </system.servicemodel>

推荐答案

this was because of network/bandwidth problem or some installed software was responsible. i restarted my server, and it seems successful till now, but still keep watching this scenario.
this was because of network/bandwidth problem or some installed software was responsible. i restarted my server, and it seems successful till now, but still keep watching this scenario.


这篇关于没有端点监听...可以接受该消息。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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