0
IIS 7.5でホストしているWCFサービス(MyService.svc)があります。 私の.svcは、Webアプリケーション自体と同じ仮想ディレクトリの下にあります。私は私のサービス操作のいくつかは、ユーザーの偽装を必要とするために取得しようとしています :私はbasicHttpBindingを使用していた(Impersonation = ImpersonationOption.Required)を使用してIISでWCFをホストする
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
:これを公開した後
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
</security>
、私は、httpに行く:/// MyServiceで。 svc。
The contract operation 'HelloWorld' requires Windows identity for automatic impersonation. A Windows identity that represents the caller is not provided by binding ('BasicHttpBinding','http://tempuri.org/') for contract ('IMyService','http://MyService'.
*更新/修正私は私の問題を発見した* :私は次のエラーを取得するとき はこれがあります。 web.configにサービス名の名前空間コンポーネントを提供していませんでした。これはすべてのことを馬鹿にしていた。
<services>
<service name="**MyNamespace**.MyService" behaviorConfiguration="MyServiceBehavior">
...
</service>
</services>