2011-02-03 33 views
1

私の単純なHelloWorld.asmxは正常に動作し、資格情報をデータベースサーバーに渡しますが、HelloWorld.svcはWebサーバーの資格情報でログインしようとします。私は、web.configファイルに偽装はasmxで動作しますが、svcでは動作しません

<identity impersonate="true" /> 

を持っており、これは、WCFサービスのバインディング:

<basicHttpBinding> 
    <binding> 
     <security mode="TransportCredentialOnly"> 
     <transport clientCredentialType="Windows" /> 
     </security> 
    </binding> 
    </basicHttpBinding> 
ASMXとSVCの両方が同じIIS7の.Net 4 Webサーバー上にある

。 WCFは他に何を偽装する必要がありますか?

答えて

2

OK、取得しました。 OperationContractでこの属性が必要です。

[OperationBehavior(Impersonation = ImpersonationOption.Required)] 
関連する問題