Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
One of the client is having an issue with HttpWebRequest. They are trying to throw Request Timeout error in case they don't receive the response within 60 seconds. Even though the timeout is set, there are no timeout exception after the specified time.
public async Task<bool> ExecuteRequest(string request, IDictionary<string, string> headers, string url, HttpResponseEventHandler handler)
WebResponse webResponseResult = null;
ResponseCode status = ResponseCode.NotConnectedToNetwork;
ServicePointManager.ServerCertificateValidationCallback = delegate
CreateWebRequest(url, headers, null, null, HttpVerbs.Post);
Task<WebResponse> asyncResult = httpRequest.GetResponseAsync();
webResponseResult = await asyncResult;
status = (ResponseCode)((webResponseResult as HttpWebResponse).StatusCode);
catch (WebException webException)
catch (Exception exception)
private HttpWebRequest CreateWebRequest(string url, IDictionary<string, string> headers,
string userName, string password, string requestMethod = "POST")
httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Timeout = 60000;
foreach (var key in headers.Keys)
httpRequest.ContentType = "text/xml; charset=utf-8";
httpRequest.Accept = "text/xml";
httpRequest.Method = requestMethod;
if (userName != null && password != null)
httpRequest.Credentials = new NetworkCredential(userName, password);
I have checked this issue with the help of sample app attached in comment 1 and not able to reproduce it. I observed that when I click on Button it does not able to find the given url(http://192.168.1.2/Api/Values/1). And after 1 or 2 minute we get the Connection Timeout exception.
Please refer the screencast:
Please review the screencast and let us know what additional steps we need to
follow to reproduce this issue.
Also, It would be great If you provide log details also. You can find xamarin log details from VS menu HELP -> Zip Xamarin Log and output log details form VIEW -> Output.
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Installed Version: Professional
Xamarin 18.104.22.168 (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 22.214.171.124 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.iOS 126.96.36.199 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Visual Studio extension to enable development for Xamarin.iOS.
Xamarin.iOS Unified Migration 1.0
Automated migration for Xamarin iOS Classic projects to Unified
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Android. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.