I’d been working on an .net framework application that accessed a web resource internal to my organisation – ie, on the internal network where I work. There was no need to use a proxy. Then all of a sudden I was asked to re-write the code for this application to enable it to use a proxy (one that did NTLM authentication) as the resource was being scrapped and we were to buy other resources and access it over the web [via our proxy].

Here’s how I did it. Call this function from your class at a point before it starts making http requests and you should be okay. NB: this code works on our wholly Microsoft Windows network with NTLM authentication everywhere including the proxy server.

This works for me. Haven’t tried it with anything other than IE + XP + IAS though.

I think this was the final code snippet.. Anyway, Give it a blast and let me know how you get on if you want to. Feel free to leave a comment. If you like it then link to it, if you don’t then tell a colleague.. 🙂