2

webHttpBinding で https を実装しているときに問題に直面しています。エラーを下回っています

WebHttpBinding をバインドするエンドポイントのスキーム https に一致するベース アドレスが見つかりませんでした。登録されているベース アドレス スキームは [http] です。

以下は私のweb.configコードです。助けてください

<system.serviceModel>
<bindings>
  <webHttpBinding>
    <binding name="webHttpMobile" maxReceivedMessageSize="2147483647">
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
      <readerQuotas maxStringContentLength="2147483647" />
    </binding>
  </webHttpBinding>
</bindings>
<services>

  <service behaviorConfiguration="mybehavior"          name="SoIn.Services.MobileWebRole.Command">
    <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding"    bindingConfiguration="webHttpMobile" contract="SoIn.Services.MobileWebRole.ICommand" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
  <service behaviorConfiguration="mybehavior" name="SoIn.Services.MobileWebRole.Query">
    <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="webHttpMobile" contract="SoIn.Services.MobileWebRole.IQuery" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
  <service behaviorConfiguration="mybehavior" name="SoIn.Services.MobileWebRole.Configuration">
    <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="webHttpMobile" contract="SoIn.Services.MobileWebRole.IConfiguration" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <endpointBehaviors>
    <behavior name="web">
      <webHttp />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="mybehavior">
      <serviceMetadata  httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

4

1 に答える 1

-2

以下の構成を試してください。

<system.serviceModel>
<bindings>
  <webHttpBinding>
    <binding name="webHttpMobile" maxReceivedMessageSize="2147483647">
      <security mode="Transport">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
      <readerQuotas maxStringContentLength="2147483647" />
    </binding>
  </webHttpBinding>
</bindings>
<services>

  <service behaviorConfiguration="mybehavior"          name="SoIn.Services.MobileWebRole.Command">
    <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding"    bindingConfiguration="webHttpMobile" contract="SoIn.Services.MobileWebRole.ICommand" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
  <service behaviorConfiguration="mybehavior" name="SoIn.Services.MobileWebRole.Query">
    <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="webHttpMobile" contract="SoIn.Services.MobileWebRole.IQuery" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
  <service behaviorConfiguration="mybehavior" name="SoIn.Services.MobileWebRole.Configuration">
    <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="webHttpMobile" contract="SoIn.Services.MobileWebRole.IConfiguration" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <endpointBehaviors>
    <behavior name="web">
      <webHttp />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="mybehavior">
      <serviceMetadata  httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
于 2012-07-17T11:29:52.310 に答える