私の WCF - 構成は、開発者のマシンで問題なく動作します。デモンストレーション環境 (別のサーバー) にリリースしようとすると、次のエラーが表示されます。
An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element 'log4net' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions.
どちらの場合も同じ私の構成:
<system.serviceModel>
<services>
<service name="UI.WS.Services.MyService" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="UI.WS.Services.IMyService"
bindingConfiguration="WsSecurityMode">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceMetadata httpGetEnabled="true" />
<!-- Extension -->
<log4net />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="WsSecurityMode">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<extensions>
<behaviorExtensions>
<!-- Extension -->
<add name="log4net" type="UI.WS.ErrorHandling.Log4NetBehaviorExtensionElement,UI,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
</system.serviceModel>
私はすでにこのヒントをチェックしましたが、これは問題ではありません (問題がある場合は、開発環境でも動作しないと思います)。
助言がありますか?