I am working on a Win7 system with the local security policy
Network Security: LAN Manager authentication level set to use NTLMv2 only.
In a piece of code I am using the .NET WebClient class as follows:
WebClient webClient = new WebClient();
NetworkCredential networkCredential =
new NetworkCredential(DomainAccountUserName, DomainAccountPassword, Domain);
webClient.Credentials = networkCredential;
webClient.DownloadFile(downloadUrl, filePath);
The problem (I think) is that the machine I am requesting authentication to can only do NTLMv1 as it is CentOS/Apache. How can Instruct WebClient to use NTLMv1?
I know I can do:
webClient.Credentials = networkCredential.GetCredential(
new Uri(downloadUrl), "NTLM");
but this still defaults to NTLMv2 -- Are there any solutions?