C# 在移动设备上并没有端点监听,但在控制台上的应用程序工作正常

C# 在移动设备上并没有端点监听,但在控制台上的应用程序工作正常,c#,wcf,service,windows-mobile,C#,Wcf,Service,Windows Mobile,我的计算机上托管了WCF服务(而不是IIS)。这项服务很好,当我称之为VS2010的funnction时。但如果我想从Windows Mobile设备调用某个方法,我会收到以下错误:在…上没有端点侦听。。。。 我的服务配置是: <?xml version="1.0"?> <configuration> <appSettings> <add key="DataSource" value="CMP\DATABASE" />

我的计算机上托管了WCF服务(而不是IIS)。这项服务很好,当我称之为VS2010的funnction时。但如果我想从Windows Mobile设备调用某个方法,我会收到以下错误:在…上没有端点侦听。。。。 我的服务配置是:

    <?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="DataSource" value="CMP\DATABASE" />
    <add key="DataName" value="DAT" />
  </appSettings>
  <system.web>
    <compilation debug="true"/>
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <bindings>
      <mexHttpBinding>
        <binding name="MexBinding"/>
      </mexHttpBinding>
      <basicHttpBinding>
        <binding name="Binding" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
          <!-- UsernameToken over Transport Security -->
          <!--<security mode="Transport">
            <message clientCredentialType="Certificate" />
          </security>-->
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="Test.Service" behaviorConfiguration="Test.ServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://10.0.0.2:1918/Myservice/Service/"/>
          </baseAddresses>
        </host>
        <!-- Service Endpoints -->
        <!-- Unless fully qualified, address is relative to base address supplied above -->
        <!--<endpoint address="" binding="wsHttpBinding" contract="WcfServiceLibrary.IService">
          -->
        <!-- 
              Upon deployment, the following identity element should be removed or replaced to reflect the 
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
              automatically.
          -->
        <!--
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>-->
        <!-- Metadata Endpoints -->
        <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
        <!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

        <endpoint address="ServiceA" binding="basicHttpBinding" bindingConfiguration="Binding" name="Service" bindingName="Binding" contract="Test.IService"/>
      </service>
    </services>
    <!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>-->
    <behaviors>
      <serviceBehaviors>
        <behavior name="Test.ServiceBehavior">
          <!-- To avoid disclosing metadata information, 
          set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <!--<serviceAuthorization principalPermissionMode="None" />-->
          <!-- 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>
  </system.serviceModel>
</configuration>


我没有在我的移动设备上设置代理。

您正在使用HttpBinding,因此某些类型的Web服务器正在您的设备上运行,允许WCF主机在本地工作。这就是卡西尼号或IIS快车。这两种方法都不允许在不进行任何调整的情况下进行远程连接。下面是如何为IIS Express执行此操作的链接‌​虽然可能,但这有点乏味。我不知道是否有可能允许卡西尼号进行远程连接