开发者

.NET Compact Framework - Cookie-based Web Service access

开发者 https://www.devze.com 2022-12-19 22:33 出处:网络
I need to access Web Service from .NET Compact Framework 3.5 application. Problem is that Web Service uses cookies for authentication. In desktop application I use .NETs CookieContainer(), which is mi

I need to access Web Service from .NET Compact Framework 3.5 application. Problem is that Web Service uses cookies for authentication. In desktop application I use .NETs CookieContainer(), which is missing in CF. 开发者_Python百科How can I manage cookies in CF without CookieContainer?

Can someone give me a hand in solving this problem? Thank you. MattheW


You'll need to work directly with the cookie HTTP header.

This forum post has a reasonable code sample to get you started:

Cookies in Compact Framework

Take a look at this Wikipedia article for more general info on the Cookie HTTP header:

HTTP Cookie - Implementation


I have managed to solve the problem. I found example posted by Alex Feinman (link below) extremely helpful. Take a look at his great solution if you encounter similar problem.

Regards, MattheW

http://groups.google.com/groups?threadm=OSxq7SlTEHA.1244%40TK2MSFTNGP10.phx.gbl

0

精彩评论

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

关注公众号