C# How to set up Webproxy with NTLM Authtification

943 views Asked by At

i wanna set up a webclient with a NTLM authtification proxy, but i have some Problems to hand over the DefaultCredentials. This is my current solution, but it doesn’t work.

        textBox.Text = "";
        IWebProxy proxy = System.Net.WebRequest.DefaultWebProxy;
        proxy.Credentials = CredentialCache.DefaultCredentials;
        WebClient client = new WebClient
        {
            Proxy = proxy
        };
        client.Credentials = CredentialCache.DefaultCredentials;
        textBox.Text = client.DownloadString("http://www.google.com");

Here are some referencing Links thatI read, but nothing work for me:

How should I set the default proxy to use default credentials?

C# Connecting Through Proxy

do you have any idea to fix this?

0

There are 0 answers