Hello, How can i get a httponly cookie in a httpwebresponse ? Habitually i use a CookieContainer to get the cookies in a httpwebresponse, but it doesnt work with httponly cookie.
Is there an other way to catch them ?
Hello, How can i get a httponly cookie in a httpwebresponse ? Habitually i use a CookieContainer to get the cookies in a httpwebresponse, but it doesnt work with httponly cookie.
Is there an other way to catch them ?
You cannot retrieve HTTPOnly cookies from the CookieContainer.
from MSDN
...You must always create a CookieContainer to send with a request if you want cookies to be returned on the response. This is also true for HTTPOnly cookies, which you cannot retrieve.
The purpose of the HttpOnly flag is to protect a cookie from a client-side script. For this reason, there is no way to retrieve them.
When an HttpOnly cookie is received by a compliant browser, it is inaccessible to client-side script.