Making web service calls with WCF client + cookies

后端 未结 1 866
一整个雨季
一整个雨季 2020-12-19 23:21

Been implementing the Basic security Authentication in a WCF Service.

Managed to get the .ASPXCookie from the web service. But

相关标签:
1条回答
  • 2020-12-19 23:35

    To add a Cookie header to the WCF request in the current context given that you have the cookie string already:

    var prop = new HttpRequestMessageProperty();
    prop.Headers.Add(HttpRequestHeader.Cookie, sharedCookie);
    OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, prop);
    
    0 讨论(0)
提交回复
热议问题