I have two WCF Web Service clients, which are generated by the "Add Service Reference" wizard:
public partial class DataSourceServiceClient : System.ServiceModel.ClientBase<DataSourceService>, DataSourceService {
...
I would like to share the same instance of CookieContainer between them, to reuse the same HTTP session.
How do I do this?
I could not find any CookieContainer property in the client or ChannelFactory.
Loading
Bechir BejaouiPosted Dec 21, 2008, 11:14 AM
to create a httphandler you create a class that implements the IHTTPHandler interface
set the IsReusable to true
and implement the ProcessRequest in which you create your common shared cookies according to your requirement and independently of any web pages, and then you register it within your web config file
and then you can use a common http session since the method argument is nothing other than a HTTPcontext instance