I want to tunnel through an HTTP request from my server to a remote server, passing through all the cookies. So I create a new HttpWebRequest
object and want to set cookies on it.
HttpWebRequest.CookieContainer
is type System.Net.CookieContainer
which holds System.Net.Cookies
.
On my incoming request object:
HttpRequest.Cookies
is type System.Web.HttpCookieCollection
which holds System.Web.HttpCookies
.
Basically I want to be able to assign them to each other, but the differing types makes it impossible. Do I have to convert them by copying their values, or is there a better way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…