私はwcfサービスを開発しました。非ネットクライアントからも呼び出されるので、basichttpbindingを使用しました。これらのメソッドの中には、偽装が必要なものがあります。これは、とのwebMethodsを飾るによって強制されています。私は、我々のテストサーバー上でサービスを展開した後wcf-serviceを呼び出すときの偽装エラー
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
私がサービスを呼び出すときに、私は奇妙なエラーが表示されます。
は、ファイルまたはアセンブリをロードできませんでした ' log4net、バージョン= 1.2.10.0、カルチャ=ニュートラル、PublicKeyToken = 1b44e1d426115821 'またはその依存関係の1つ。必要な偽装レベルが指定されていないか、提供されている偽装レベルが無効です。 (HRESULTからの例外:0x80070542)
私がサービスを呼び出す方法とは無関係に、このエラーが発生します。私はwcfTestClient経由で呼び出すとそれを取得し、私が書いたコンソールアプリケーション経由で呼び出すとそれを取得します。 (私は非ネットクライアントの動作をシミュレートするこのアプリケーションへのWeb参照としてwebserviceを追加しました)
アイデア?
PS:
<system.web>
<compilation targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding closeTimeout="00:15:00" openTimeout="00:15:00" sendTimeout="00:15:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<defaultDocument>
<files>
<add value="CrmConnectorDiamondData.svc" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
しかし、私はそのアセンブリが必要です。私はサーバ上で何が起こるかをログに記録しなければならず、log4netはそのための "私たちの"ライブラリです。 – Jerma
そのアセンブリを使用する必要がある場合は、別の認証方法を使用することをおすすめします。 httpsでの基本認証は、私が個人的に使いたいものです。 –