I have a MonoTouch iPhone app that does federated login through the Azure Access Control Service. Login is via the built-in UIWebView browser. When the login is done, I want to transfer the cookie to my application. I have access to
NSHttpCookieStorage.SharedStorage.Cookies
so i can find the cookie. But in order to call back end services, I need to have
System.Net.Cookie
which I can put in a CookieContainer to send to the service.
How do I convert between two ... is this the only way?
NSHttpCookie cookie = NSHttpCookieStorage.SharedStorage.Cookies[0]; System.Net.Cookie newCookie = new System.Net.Cookie() { Name = cookie.Name, Value = cookie.Value, Version = (int) cookie.Version, Expires = cookie.ExpiresDate, Domain = cookie.Domain, Path = cookie.Path, Port = cookie.PortList[0].ToString(),
Roy
source share