wcf操作cookie看似很简单,如果不对Wcf研究一把还是很难的,基本上无从下手. 这里上一图 上面的结果,岂止是坑爹,简直就是坑爹!!! 废话不多说,直接上代码: cookie读取 var requestProperties = OperationContext.Current.IncomingMessageProperties; var hrp = requestProperties[HttpRequestMessageProperty.Name] as HttpRequestMessag…
public override bool Login(string userName, string password) { using (HttpClient client = new HttpClient(URI)) { StringBuilder sb = new StringBuilder(); sb.Append("Login"); Uri uri = new Uri(URI + sb.ToString()); Login lg = new Login(); lg.userN…