System.Net.Cookie

Does anyone know if it is possible to convert a System.Net.Cookie to a System.Web.HttpCookie ? What is the difference exactly?

What I'm trying to do is simulate a pseudo-autologin feature on my site into another website. So for example, my code does an HttpRequest to a remote server that returns the Authentication cookie. I then want to send that cookie to the client so they can make regular requests to the remote server as an authenticated user, without having to go through my application again.

So far, I have been able to get the authentication cookie just fine, but I can't figure out a way to send it to client. I was hoping i could just add it to the current HttpResponse and send it to the client that way, but it uses HttpCookies, not .Net.Cookies, which is what the HttpWebResponse object returns from my "behind-the-scenes" post. Is this even possible?

Any help would be appreciated!
Thanks,
Peter
原文地址:https://www.cnblogs.com/mokliu/p/2138145.html