CookieManagerMessageInspector
Maintains a copy of the cookies contained in the incoming HTTP response received from any service and appends it to all outgoing HTTP requests.
This class effectively allows to send any received HTTP cookies to different services, reproducing the same functionality available in ASMX Web Services proxies with the <xref href="System.Net.CookieContainer" data-throw-if-not-resolved="false"></xref> class. Based on http://megakemp.wordpress.com/2009/02/06/managing-shared-cookies-in-wcf/
Assembly: ServiceStack.Client.dll
View Source
public class CookieManagerMessageInspector : IClientMessageInspector
Properties
Uri
View Source
public string Uri { get; set; }
Instance
Gets the singleton ServiceStack.CookieManagerMessageInspector instance.
This class effectively allows to send any received HTTP cookies to different services, reproducing the same functionality available in ASMX Web Services proxies with the <xref href="System.Net.CookieContainer" data-throw-if-not-resolved="false"></xref> class. Based on http://megakemp.wordpress.com/2009/02/06/managing-shared-cookies-in-wcf/
View Source
public static CookieManagerMessageInspector Instance { get; }
Methods
AfterReceiveReply(ref Message, Object)
Inspects a message after a reply message is received but prior to passing it back to the client application.
View Source
public void AfterReceiveReply(ref Message reply, object correlationState)
Parameters
Type | Name | Description |
---|---|---|
System.ServiceModel.Channels.Message | reply | The message to be transformed into types and handed back to the client application. |
|
| System.Object
| correlationState | Correlation state data.
|
BeforeSendRequest(ref Message, IClientChannel)
Inspects a message before a request message is sent to a service.
View Source
public object BeforeSendRequest(ref Message request, IClientChannel channel)
Returns
System.Object
:
<strong>Null</strong> since no message correlation is used.
Parameters
Type | Name | Description |
---|---|---|
System.ServiceModel.Channels.Message | request | The message to be sent to the service. |
|
| System.ServiceModel.IClientChannel
| channel | The client object channel.
|
Implements
System.ServiceModel.Dispatcher.IClientMessageInspector