R
RT
Calling a .NET webservice (win2k3) from an ASP.NET webservice client
(xp). There is a farm of win2k3 servers hosting the webservice behind a
load balancer.
One part of our webservice is stateful by design and the session state
is achieved by the load balancer by inserting a cookie into the
response headers.
On the client, we are appropriately using the CookieContainer and
assigning the CookieContainer object to the proxy object as it is
supposed to be (there is a single instance of the proxy object and the
cookiecontainer object).
private OurWebService m_ws = new OurWebService();
private CookieContainer m_cookies;
later in the code while invoking a method on the webservice
if ( m_cookies == null )
m_cookies = new CookieContainer();
if ( m_ws.CookieContainer == null )
m_ws.CookieContainer = m_cookies;
m_ws.CallMethod();
We notice that sometimes the cookies are getting sent down as part of
the request header in the above call - and at other times they are
not!! When they dont get sent down, the cookiecontainer does not
contain the cookie at all. This is very random behavior and has us
completely mystified.
Any clues as to why?
Thanks
(xp). There is a farm of win2k3 servers hosting the webservice behind a
load balancer.
One part of our webservice is stateful by design and the session state
is achieved by the load balancer by inserting a cookie into the
response headers.
On the client, we are appropriately using the CookieContainer and
assigning the CookieContainer object to the proxy object as it is
supposed to be (there is a single instance of the proxy object and the
cookiecontainer object).
private OurWebService m_ws = new OurWebService();
private CookieContainer m_cookies;
later in the code while invoking a method on the webservice
if ( m_cookies == null )
m_cookies = new CookieContainer();
if ( m_ws.CookieContainer == null )
m_ws.CookieContainer = m_cookies;
m_ws.CallMethod();
We notice that sometimes the cookies are getting sent down as part of
the request header in the above call - and at other times they are
not!! When they dont get sent down, the cookiecontainer does not
contain the cookie at all. This is very random behavior and has us
completely mystified.
Any clues as to why?
Thanks