绑定两个端点时出现WCF错误

绑定两个端点时出现WCF错误,wcf,wcf-binding,Wcf,Wcf Binding,我明白了 -错误:类型为的未处理异常 中出现“System.Configuration.ConfigurationErrorsException” System.Configuration.dll其他信息:位于 system.serviceModel/bindings/basicHttpBinding没有 已配置名为“BasicHttpBinding_IService1”的绑定。这是一个 bindingConfiguration的值无效 这是我的web.config文件 <?xml ver

我明白了 -错误:类型为的未处理异常 中出现“System.Configuration.ConfigurationErrorsException” System.Configuration.dll其他信息:位于 system.serviceModel/bindings/basicHttpBinding没有 已配置名为“BasicHttpBinding_IService1”的绑定。这是一个 bindingConfiguration的值无效

这是我的web.config文件

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

  <configSections>
  </configSections>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.serviceModel>

    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IService1" maxBufferSize="1000000000" maxBufferPoolSize="1000000000" maxReceivedMessageSize="100000000">
          <readerQuotas maxDepth="32" maxStringContentLength="2097152 "
            maxArrayLength="2097152" maxBytesPerRead="4096" maxNameTableCharCount="16384"  />
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="WcfService1.Service1">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
          contract="WcfService1.IService1" />
        <endpoint address="web" behaviorConfiguration="WebBehaviour" binding="webHttpBinding"
          bindingConfiguration="" name="WebEndPoint" contract="WcfService1.IService1" />
      </service>
    </services>
    <behaviors>

      <endpointBehaviors>
        <behavior name="WebBehaviour" >

          <enableWebScript />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="DefaultBehaviour">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>    

    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
        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"/>
  </system.webServer>

</configuration>

您的两个端点都有一个空绑定配置:bindingConfiguration=。是否应该是bindingConfiguration=BasicHttpBinding\u IService1?是否可以将出现此错误的代码发布到哪里?Private Sub按钮8\u单击Sender As Object,e As EventArgs Handles按钮8。单击Dim oProxy As New ServiceReference1.Service1Client--error MessageBox.ShowoProxy.GetA End Sub