[MonoTouch] Windows Auth and MonoTouch
Gonzalo Paniagua Javier
gonzalo.mono at gmail.com
Thu Oct 1 23:40:22 EDT 2009
On Fri, 2009-10-02 at 03:32 +0000, Paul Bowden wrote:
> Oh, cool - I didn't realize that. I tried searching around for an example code snippet, but couldn't find anything. Do you have an example of how to implement this with HttpWebRequest?
You do the same that you do for basic or digest authentication, only
that setting PreAuthenticate to 'true' will not save you a round-trip
(NTLM requires 2 or 3).
HttpWebRequest req = (HttpWebRequest) WebRequest.Create (YOUR_WINDOWS_SERVER);
req.Credentials = new NetworkCredentials ("user", "pass"); // This can take a domain too
...
-Gonzalo
More information about the MonoTouch
mailing list