Re: [Mono-dev] WebRequest time out error

2016-02-01 Thread LeMoussel
Well , well, seems this problem has not been resolve?



--
View this message in context: 
http://mono.1490590.n4.nabble.com/WebRequest-time-out-error-tp4667345p4667353.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] WebRequest time out error

2016-01-30 Thread Timotheus Pokorra
> It failed immediately with Time Out error. The code is crashing on the line:
> `HttpWebResponse response = (HttpWebResponse)request.GetResponse();`
>
> What is causing this to happen and how can I fix it?
This reminds me of some issue I had some years ago.
But I could not reproduce it anymore with Mono 3.12.0
https://bugzilla.xamarin.com/show_bug.cgi?id=11833

Perhaps the patch
https://github.com/mono/mono/commit/8c2167d52cb9acf9582647ebb5f99c92d9127fbd
would work for you? I have not checked if that patch still applies, or
if the code has been replaced by the reference code...
I have not tested my use case for a while, that was making use of the
httpwebrequest.

Timotheus
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] WebRequest time out error

2016-01-30 Thread LeMoussel
I tried to build an application with Linux/Mono "version 4.2.1 Stable
4.2.1.102/6dd2d0d", but I got the following errors (Rem: No error on Windows
system).

Unhandled Exception:
System.Net.WebException: The remote server returned an error: (504)
Gateway Time-out.
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
<0xb464dc48 + 0x0018c> in :0
  at System.Net.HttpWebRequest.GetResponse () <0xb4646470 + 0x0006b> in
:0

The bit of code causing this issue is:

WebProxy webProxy = new WebProxy(proxyUri, true);
webProxy.Credentials = new NetworkCredential(proxyUserName,
proxyPassword);
WebRequest request = WebRequest.Create(targetUri);
request.Proxy = webProxy;
request.Method = "CONNECT";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();  
Stream responseStream = response.GetResponseStream();

It failed immediately with Time Out error. The code is crashing on the line:
`HttpWebResponse response = (HttpWebResponse)request.GetResponse();`

What is causing this to happen and how can I fix it?





--
View this message in context: 
http://mono.1490590.n4.nabble.com/WebRequest-time-out-error-tp4667345.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list