开发者

WCF: How do you handle the UnknownMessageReceived message?

Currently I have this:

Private Sub AamServiceHost_UnknownMessageReceived(ByVal sender As Object, ByVal e As UnknownMessageReceivedEventArgs) Handles Me.UnknownMessageReceived

    m_Log.Write(m_Name & " has receive开发者_JAVA技巧d an unknown message. The message will be ignored.", Severity.ErrorTaskFailed)

End Sub

I see there is a e.Message property but I'm not sure what parts of it are safe to read.


In General, you can read any part of the message, like it's properties, headers and the contents. Is there a reason, however, you need to handle this event? In general, if this is happening it means either that you're missing something on your contract/service implementation (otherwise, it's useful for debugging, but it's not something you should really rely on).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜