, 당신은 지금이 Request 객체가 쿠키를 포함
HttpContext.Current.Request
에 액세스 할 수있다. 쿠키 컬렉션을 반복하고 필요한 것을 제거 할 수 있습니다.
foreach는 (request.Cookies에서 VAR 쿠키) {//}
WCF 클라이언트에서 쿠키 관리에 대해 설명
code project에서 훌륭한 기사
UPDATE
HttpContext는 서버 측에서만 사용할 수 있으므로 필자의 이전 대답은 Phil이 지적한 잘못된 답변입니다.
자체
MyWebServiceClient client = new MyWebServiceClient();
using (new OperationContextScope(client.InnerChannel))
{
HttpRequestMessageProperty request = new HttpRequestMessageProperty();
//get the instance of your AuthCookie and make it blank
request.Headers["AuthCookie"] = "";
OperationContext.Current.OutgoingMessageProperties[
HttpRequestMessageProperty.Name] = request;
client.InvokeSomeMethod();
}
이 예 here
으로 HttpContext를 찾을 수는 HttpRequest를 잡아 가지고 오히려 서투른 것 그것을 할 올바른 방법은 서버 측 지원과 클라이언트가 아닌입니다. –
네가 맞습니다. 내 대답을 편집하여 반영 – Anand