Last post May 30, 2019 09:57 AM by Ackerly Xu
May 29, 2019 01:57 PM|gani7787|LINK
I am trying to download the content file from specific URL. But, i'm getting error.
below is my code :
DownloadURL = "http://servertest.mnet.comp.intranet:80/tm-rest/repos/contents/content";
// To get content from URL
WebClient client = new WebClient();
WebProxy wp = new WebProxy("http://servertest.mnet.comp.intranet",80);
wp.Credentials = new NetworkCredential("test1", "pass", "mnet.comp.intranet");
client.Proxy = wp;
Error : The proxy name could not be resolved: 'http'
What is the error and how we could solve this problem...?
May 29, 2019 02:06 PM|mgebhard|LINK
The proxy server does not exist or DNS is not configured.
May 30, 2019 03:12 AM|Ackerly Xu|LINK
You could try to pin http://servertest.mnet.comp.intranet to see whether your computer has network connection to
If you have http://servertest.mnet.comp.intranet's ip address , try to directly input the ip address of your http proxy to see what happens.
Please ensure you have internet connection to your proxy.
May 30, 2019 05:35 AM|gani7787|LINK
my computer has already in network. pinging the domain ip and it's working.
when i directly open the url through browser, it will be asking usename and password. when i give user name and password then it will open the content file.
But, same when i execute trough code with correct credentials, again it shows "The remote server returned an error: (401) Unauthorized." (don't know why it is...????)
Is it possible to read content tag without downloading URL file,
May 30, 2019 09:57 AM|Ackerly Xu|LINK
From your code , your proxy and target address it the same.
Although you provides username and password when using the proxy, when the proxy forwards your request to the target address , it may not provide username and password.
So, if your computer could directly connects to the server and provide username and password, you could include the username and password directly in the webclient when sending request instead of using a proxy.
For how to provide username and password using webclient , you could refer to
Also , refer to
https://stackoverflow.com/questions/16044313/webclient-httpwebrequest-with-basic-authentication-returns-404-not-found-for-v for more way to include username and password.