i'm trying to reply a wcf request in 'AfterReceiveRequest' method of message inspector (implements IDispatchMessageInspector)
XmlReader xmlReader = XmlReader.Create(
new StringReader(string.Format(@"<{0}Response xmlns='{1}' />",methodName,namespace)));
Message replyMsg = Message.CreateMessage(request.Version, request.Headers.Action, xmlReader);
OperationContext.Current.RequestContext.Reply(replyMsg);
client gets the response immediately by this way.
Rest of the task is to break the execution on server and end up without a fault.
request.Close() breaks the execution, but if you take a look at message in 'BeforeSendReply' ,, it creates a fault.
well its not appropriate for us, and looking for a convenient termination. is there anyway to do it??
thanks.
Ali TAKAVCI