[Mono-list] Authenticating against an NTLM only server using HttpWebRequest/NetworkCredential

Sebastien Pouliot sebastien.pouliot at gmail.com
Mon Jan 8 10:14:01 EST 2007

On Fri, 2007-01-05 at 17:49 +0000, David Kennedy wrote:
> Hi,
> I have a small program (should be attached) which tries to download a
> file from a server running IIS/SharePoint. If I compile this with mcs
> and run it with .Net, the file is downloaded from the server and
> displays in the console. If I run it with Mono, the request is
> unauthorized.
> I've had a look around and found some things similar, but I haven't
> seen any solutions to this. Is there a way to authenticate with a
> server with NTLM, or can it only be Basic/Digest/Kerberos?

Mono, since pre-1.0, supports Basic, Digest and NTLM (but not Kerberos).

It cannot, like MS can do, process authentication without you providing
the password. It's possible that the password you supply (in your source
code) isn't the one being used.

When in doubt in web authentication use a network sniffer, like
ethereal, to look (it's even easier when SSL/TLS isn't involved) at the
working and failing. You'll probably see a clue to guide you.

> Cheers
> Dave
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/

More information about the Mono-list mailing list