简体   繁体   English

在 {0} 处没有侦听端点可以接受消息。 这通常是由不正确的地址或 SOAP 操作引起的。 (Xamarin 安卓)

[英]There was no endpoint listening at {0} that could accept the message. This is often cause by an incorrect address or SOAP action. (Xamarin Android)

I can normally run the application on the emulator and do some action before, but for some reason this suddenly appeared even though the webservice runs properly on the browser.我可以在模拟器上正常运行应用程序并在之前执行一些操作,但是由于某种原因,即使 web 服务在浏览器上正常运行,这也会突然出现。

错误

I looked for a solution with similar case as this but I can't seem to figure out how to do it because I am using Xamarin which has a different way of adding service reference.我寻找了一个与此类似的解决方案,但我似乎无法弄清楚如何去做,因为我使用的是 Xamarin,它具有不同的添加服务引用的方式。

Here are my codes:这是我的代码:

ServiceReferences.ClientConfig ServiceReferences.ClientConfig

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IFSREmployee" maxBufferSize="2147483647"
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:51678/FSREmployee.svc" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IFSREmployee" contract="IFSREmployee"
                name="BasicHttpBinding_IFSREmployee" />
        </client>
        <extensions />
    </system.serviceModel>
</configuration>

Web.config网页配置

<?xml version="1.0"?>
<configuration>

  <connectionStrings>
    <add name="SQL_HCMConnectionString" connectionString="Data Source=ADGTAPPS5;Initial Catalog=SQL_HCM;User ID=hcm;Encrypt=False;TrustServerCertificate=True"
      providerName="System.Data.SqlClient" />
    <add name="OFFICEConnectionString" connectionString="Data Source=ADGTAPPS5;Initial Catalog=OFFICE;User ID=office;Encrypt=False;TrustServerCertificate=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
    <httpModules>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
    </httpModules>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https"/>
    </protocolMapping>    
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="ApplicationInsightsWebTracking"/>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
        preCondition="managedHandler"/>
    </modules>
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>

</configuration>

Which emulator are you using it might be the problem of your emulator.您使用的是哪个模拟器可能是您的模拟器的问题。 Use genymotion emulator it is the works smooth without any problems.使用 genymotion 模拟器它是工作顺利没有任何问题。 And a service hosted on localhost can be accessed through a proxy or with the IP.并且可以通过代理或使用 IP 访问托管在 localhost 上的服务。

已经通过再次创建网络服务解决了,现在它可以正常工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有端点监听GPService可以接受该消息。 这通常是由不正确的地址或SOAP操作引起的。 - There was no endpoint listening GPService that could accept the message. This is often caused by an incorrect address or SOAP action. 在 net.tcp://url 上没有侦听端点可以接受消息。 这通常是由不正确的地址或 SOAP 操作引起的 - There was no endpoint listening at net.tcp://url that could accept the message. This is often caused by an incorrect address or SOAP action 没有端点可以在https://…上侦听该消息。 这通常是由错误的地址或SOAP操作引起的 - There was no endpoint listening at https://… that could accept the message. This is often caused by an incorrect address or SOAP action ASP核心“没有在[url]上侦听的终结点可以接受该消息。 ” - ASP Core “There was no endpoint listening at [url] that could accept the message. ” wcf-代码中的客户端绑定-错误:“没有端点监听.svc来接受消息。” - wcf - Client Binding in Code- Error : “There was no endpoint listening at .svc that could accept the message.” 没有端点在听……可以接受该消息 - There was no endpoint listening at…that could accept the message WCF:没有端点在侦听,可以接受消息 - WCF: There was no endpoint listening at, that could accept the message 没有端点监听 <url> 可以接受消息 - There was no endpoint listening at <url> that could accept the message 没有端点侦听 (url) 可以接受消息 - There was no endpoint listening at (url) that could accept the message 使用WCF Web服务时“没有侦听端点可以接受消息” - “There was no endpoint listening at that could accept the message” when consuming WCF web service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM