のみを使用して、IIS で SSL と基本認証を使用して WCF サービスをセットアップすることは可能BasicHttpBinding-binding
ですか?
(私は使えませんwsHttpBinding-binding
)
このサイトは IIS 7 でホストされており、次の認証が設定されています。
- 匿名アクセス:オフ
- 基本認証:ON
- 統合 Windows 認証:オフ
サービス構成:
<services>
<service name="NameSpace.SomeService">
<host>
<baseAddresses>
<add baseAddress="https://hostname/SomeService/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<endpoint address="" binding="basicHttpBinding"
bindingNamespace="http://hostname/SomeMethodName/1"
contract="NameSpace.ISomeInterfaceService"
name="Default"
/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="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="false"/>
<exceptionShielding/>
</behavior>
</serviceBehaviors>
</behaviors>
2 つの異なるエラーで2 種類のバインディングを試しました。
- 1. IIS エラー:
「バインディング BasicHttpBinding を持つエンドポイントのスキーム http に一致するベース アドレスが見つかりませんでした。登録されているベース アドレス スキームは [https] です。
<bindings> <basicHttpBinding> <binding> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Basic"/> </security> </binding> </basicHttpBinding> </bindings>
- 2. IIS エラー:
このサービスのセキュリティ設定には「匿名」認証が必要ですが、このサービスをホストする IIS アプリケーションでは有効になっていません。
<bindings> <basicHttpBinding> <binding> <security mode="Transport"> <transport clientCredentialType="Basic"/> </security> </binding> </basicHttpBinding> </bindings>
これを正しく構成する方法を知っている人はいますか? (可能であれば?)