1
Windows認証(https以上)を使用するようにIIS WCF Webサービスを設定しました。また、WSDLにアクセスする際に、 、それは次に動作します。だからすべてがうまくいきます。WCF:権限を持つSSL/TLSセキュアチャネルの信頼関係を確立できませんでした。
しかし、私は現在のユーザーのWindows資格情報を渡す方法を理解することはできません、私は主題で詳述されているエラーを続けています。
これは、サーバーのweb.configファイルである:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsBindingTest">
<security mode="Transport">
<message negotiateServiceCredential="true" clientCredentialType="Windows"/>
<transport clientCredentialType="Windows"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<protocolMapping>
<remove scheme="http" />
<add scheme="http" binding="wsHttpBinding" bindingConfiguration="wsBindingTest" />
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
</configuration>
これは、クライアントである:
ConfigurationChannelFactory<ITRIMService> channelFactory = new ConfigurationChannelFactory<ITRIMService>("BasicHttpBinding_ITRIMService", config, null);
var channel = channelFactory.CreateChannel();
私が試した:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="BasicHttpBinding_ITRIMService">
<security mode="Transport">
<transport clientCredentialType="Windows" proxyCredentialType="None" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://servername.net/TRIMDev/TRIMService.svc"
binding="wsHttpBinding" bindingConfiguration="BasicHttpBinding_ITRIMService"
contract="Service.ITRIMService" name="BasicHttpBinding_ITRIMService">
<identity>
<servicePrincipalName value="host/servername.net" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
これは、最終的には、チャネルを作成するコードですクライアントの設定に次の行を追加してください。何もできません。彼のクライアント:
<system.web>
<identity impersonate="true"/>
<authentication mode="Windows" />
</system.web>
私はちょうどそれが動作していない理由を知るには分からないので、どんな助けも大いに感謝します。
私はそうは思わない、wsHTTPbindingは現在のバージョンであり、wsBasicは遺産である。 しかし、私はそれを働かせていますが、私はなぜそれほど確かではありません。私がそのセクションを持っていれば動作しますが、それが削除されていれば匿名 –