Android 通过我的应用程序使用WCF。我收到引用端点警告

Android 通过我的应用程序使用WCF。我收到引用端点警告,android,wcf,iis,web-config,Android,Wcf,Iis,Web Config,对于.Net Standart 2.0 MVVM项目,我尝试添加对Restful WCF服务(IIS Express)的引用,但收到一条警告,指出找到了0个端点。至于WCF服务器,一切似乎都正常。我还使用实体框架。有什么问题吗? 我将添加web.config文件的一部分以及警告 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <!-- For mo

对于.Net Standart 2.0 MVVM项目,我尝试添加对Restful WCF服务(IIS Express)的引用,但收到一条警告,指出找到了0个端点。至于WCF服务器,一切似乎都正常。我还使用实体框架。有什么问题吗? 我将添加web.config文件的一部分以及警告

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework"
             type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
             requirePermission="false" />
  </configSections>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext"
         value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.7.2" />
    <httpRuntime targetFramework="4.7.2" />
  </system.web>
  <system.serviceModel>

    <!--1CHANGED-->
    <services>

      <service name="MoodWcfService.Services.UserService">
        <endpoint address=""
                  behaviorConfiguration="UserService_Behavior"
                  binding="webHttpBinding"
                  contract="MoodWcfService.IServices.IUserService" >
        </endpoint>
      </service>

      <service name="MoodWcfService.Services.RestaurantService">
        <endpoint address=""
                  behaviorConfiguration="RestaurantService_Behavior" 
                  binding="webHttpBinding"
                  contract="MoodWcfService.IServices.IRestaurantService" >
        </endpoint>
      </service>

      <service name="MoodWcfService.Services.EvaluationService">
        <endpoint address=""
                  behaviorConfiguration="EvaluationService_Behavior"
                  binding="webHttpBinding"
                  contract="MoodWcfService.IServices.IEvaluationService" >
        </endpoint>
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" 
                           httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>

      <endpointBehaviors>

        <behavior name="UserService_Behavior">
          <webHttp helpEnabled ="true"/>
        </behavior>

        <behavior name="RestaurantService_Behavior">
          <webHttp helpEnabled ="true"/>
        </behavior>

        <behavior name="EvaluationService_Behavior">
          <webHttp helpEnabled ="true"/>
        </behavior>

      </endpointBehaviors>
    </behaviors>
    <!--1CHANGED-->

    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" 
                               multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />


首先,默认情况下,WebHttpBindig创建的WCF服务不能通过添加服务参考菜单来使用。这种服务称为WCF Web服务(RESTAPI)。

默认情况下,它不支持从客户端代理类或通道工厂调用服务。因为RESTAPI有自己的路径寻址方法。因此,在Appconfig文件中,没有通过添加服务引用生成的端点。
调用RESTAPI的一般方法是通过HTTP客户端使用特定的HTTP谓词直接发送请求。
此外,IIS不支持同时发布多个接口服务。不要在单个WCF项目中添加多个服务合同。

如果有什么我可以帮忙的,请随时告诉我。

如果此警告对您有效,您可以忽略此警告。它的出现似乎是因为您的WSDL不包含任何有关端点的信息。您可以参考一些git hub问题链接:,