开发者

Retrieving cookie from a Container in ASP.NET MVC and C#

开发者 https://www.devze.com 2023-01-07 12:24 出处:网络
//Controller code CookieContainer cookieContainer = new CookieContainer(); //makes new cookie here cookieContainer.Add(myCookie);
//Controller code
CookieContainer cookieContainer = new CookieContainer();
//makes new cookie here
cookieContainer.Add(myCookie);


//Service/Facade code
//myCookie gets passed开发者_StackOverflow中文版 here

How do I pull the cookie out of the container to make sure it's the right cookie?


Assuming you trying to use cookies with web services, check out this Microsoft Support article:

HOW TO: Use CookieContainer to Maintain a State in Web Services When You Use Visual C# .NET

0

精彩评论

暂无评论...
验证码 换一张
取 消