Hello,
I'm not sure you can read cookies from UIWebView, but you can do you your
own post (or get first, depending on the security) with WebClient and then
capture the cookies. All you need to do attach your own CookieContainer:
public class CookieWebClient : WebClient
{
private CookieContainer _container = new CookieContainer();
public CookieContainer Cookies { get { return _container; } }
protected override WebRequest GetWebRequest(Uri address)
{
WebRequest request = base.GetWebRequest(address);
if (request is HttpWebRequest)
((HttpWebRequest)request).CookieContainer = _container;
return request;
}
}
Hope this helps.
Mikkel
2011/6/6 Andreas Ploetzeneder <[email protected]>
> Hello,
> how can i read out cookies from UIWebView into the webclient,if i do not
> want to relogin there
>
> --
>
>
>
>
>
> Mit freundlichem Gruß,*
>
> Andreas Plötzeneder*
> CEO
> *ihr ploetzeneder it-solutions Team
> **Mobile
> Development*<http://www.ploetzeneder-it.com/softwareentwicklung/mobile-development.html>
> * –
> **Desktopanwendungen*<http://www.ploetzeneder-it.com/softwareentwicklung/desktop-anwendungen.html>
> * –
> **Webanwendungen*<http://www.ploetzeneder-it.com/softwareentwicklung/web-anwendungen.html>
> *
> Tel:* +43 720 30 30 24 10
> *Fax:* +43 720 30 30 24 20
> *Email:* [email protected]
> *web: *http://www.ploetzeneder-it.com
>
> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
> und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
> vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so löschen
> sie diese bitte und informieren Sie den Absender. Jede Form der Verbreitung
> oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in Teilen,
> die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
> Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
> it-solutions übernimmt daher keine Haftung, falls die E-Mail geändert wurde.
>
>
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch