.NET Compact Framework - Cookie-based Web Service access
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
精彩评论