control over http headers using clumsy:

MyWebServiceClient client = new MyWebServiceClient();
 
using ( new OperationContextScope( client.InnerChannel ) )
{
    HttpRequestMessageProperty request = new HttpRequestMessageProperty();
    request.Headers["Cookie"] = "cookie header value";
 
    OperationContext.Current.OutgoingMessageProperties[
        HttpRequestMessageProperty.Name] = request;
 
    client.InvokeSomeMethod();
}
posted on 2024-08-22 13:13  daconglee  阅读(5)  评论(0编辑  收藏  举报