- 论坛徽章:
- 0
|
现在有两个asp开发的web service,需要从第一个webservice中获取一个cookie,并传递到第二个web service中,请教如何获得并设置cookie
web service的提供方仅仅提供了vb调用例子,如下:
获得cookie
using (OperationContextScope scope = new OperationContextScope(_loginClient.InnerChannel))
{
status = _loginClient.Login(userName, password, null, true);
cookieValue = OperationContext.Current.GetOutgoingCookies();
}
设置cookie
using (OperationContextScope s = new OperationContextScope(_batchClient.InnerChannel))
{
OperationContext.Current.SetOutgoingCookies(signInStatus.CookieValue);
data = _batchClient.FetchAvailableBatchFiles();
}
求教,万分感激 |
|