【发布时间】:2013-03-15 04:56:15
【问题描述】:
我实现了 IDispatchMessageInspector.AfterReciveRequest 然后我这样配置:
<configuration>
<system.serviceModel>
<services>
<service
name="Microsoft.WCF.Documentation.SampleService"
behaviorConfiguration="inspectorBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/SampleService" />
</baseAddresses>
</host>
<endpoint
address=""
binding="wsHttpBinding"
contract="Microsoft.WCF.Documentation.ISampleService"
/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="inspectorBehavior">
<serviceInspectors />
</behavior>
</serviceBehaviors>
</behaviors>
<extensions>
<behaviorExtensions>
<add
name="serviceInspectors"
type="Microsoft.WCF.Documentation.InspectorInserter, HostApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
/>
</behaviorExtensions>
</extensions>
</system.serviceModel>
</configuration>
但它不起作用。
我检查了我的程序集和本地参考,但没有找到 Microsoft.WCF.Documentation.InspectorInserter 或 HostApplication dll
我在网上搜索下载HostApplication dll,但没有找到。
我该怎么办?
我需要实现更多的东西,或者我只需要这个配置。
【问题讨论】:
-
您的配置不完整。发布完整的配置、检查器代码和行为代码。同时删除那两个空帖子。
标签: c# wcf idispatchmessageinspector