Last post Aug 07, 2009 08:30 PM by MWeber
Aug 07, 2009 08:30 PM|MWeber|LINK
I have added an Inspector to my Service:
Next, I override ProcessRequest so I can work with the Message.
Public Overloads Overrides Sub ProcessRequest(ByRef requestContext As RequestContext)
If requestContext Is Nothing OrElse requestContext.RequestMessage Is Nothin Then
Dim Message As Message = requestContext.RequestMessage
Dim StringWriter As New IO.StringWriter
Dim TextWriter As New XmlTextWriter(StringWriter)
TextWriter.Formatting = Formatting.Indented
The problem is that I get this error "This message cannot support the operation because it has been written."
I tried creating a buffered copy of the message, but then I get the following error "This message cannot support the operation because it has been written."
Does anyone know how to access the message without getting any errors? Can you please post the code?