0

嗨,这是我第一次使用我的 WP7 设备和 WCF,

我正在使用 WCF 服务与集中式数据库进行通信,当我尝试在模拟器中运行应用程序时它工作得很好,但是当我将它部署到设备时,我收到以下错误消息

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

我的 Web.config 文件

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
    <compilation debug="false" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <!-- <client>
      <endpoint address="http://10.11.32.211:88/ABCService/Service.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IABCService"
        contract="ABCServiceReference.IABCService" name="BasicHttpBinding_IABCService" />
    </client> -->
    <bindings>

      <basicHttpBinding>
    <binding name="basicHttpBinding_ABCService" sendTimeout="00:01:30" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Buffered">

      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxNameTableCharCount="16384" maxBytesPerRead="2147483647" />
    </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
    <behavior>

      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
      <serviceMetadata httpGetEnabled="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="true" />
    </behavior>

      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  </configuration>

应用程序配置文件

 <configuration>
 <system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IABCService" maxBufferSize="2147483647"
                maxReceivedMessageSize="2147483647">
                <security mode="None" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://10.11.32.211:88/ABCService/Service.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IABCService"
            contract="ABCServiceReference.IABCService" name="BasicHttpBinding_IABCService" />
    </client>
 </system.serviceModel>
 </configuration>

内部异常

"The remote server returned an error: NotFound."

堆栈跟踪

at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.OnGetResponse(IAsyncResult result)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClassa.<InvokeGetResponseCallback>b__8(Object state2)
at System.Threading.ThreadPool.WorkItem.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPool.WorkItem.doWork(Object o)
at System.Threading.Timer.ring()

我使用 WIFI 连接到 My Lan

4

2 回答 2

0

本地 DNS/路由器问题,通过更改路由器和 DNS 中的设置解决

于 2012-07-23T11:24:56.617 回答
0

我认为您的端点 IP 10.11.32.211:88不是公开的,您可以使用手机访问那里

于 2012-07-18T11:00:40.713 回答