Tôi Thực hiện IDispatchMessageInspector.AfterReciveRequest Sau đó, tôi cấu hình như thế này:IDIspatchMessageInspector
<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>
nhưng nó không hoạt động.
tôi kiểm tra trong lắp ráp của tôi và trong tài liệu tham khảo địa phương của tôi và tôi didnt tìm thấy Microsoft.WCF.Documentation.InspectorInserter
hoặc HostApplication
dll tôi tìm kiếm trong mạng để tải HostApplication
dll nhưng tôi thấy không có gì.
Tôi phải làm gì?
Tôi cần triển khai nhiều thứ hơn hoặc chỉ cần cấu hình này.
Cấu hình của bạn chưa hoàn tất. Đăng cấu hình hoàn chỉnh, mã kiểm tra và mã hành vi. Đồng thời xóa hai bài đăng trống đó. –