Bug 25054 - UriImageSource cannot download images from behind a proxy server
Summary: UriImageSource cannot download images from behind a proxy server
Status: RESOLVED FEATURE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-03 18:04 UTC by Jon Cortez
Modified: 2016-05-28 00:47 UTC (History)
6 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FEATURE

Description Jon Cortez 2014-12-03 18:04:55 UTC
If the iOS app is running on a simulator or device configured with a proxy server (the usual case in BYOD), UriImageSource cannot download the image. The following example will not work:

var webImage = new Image { Source = "http://xamarin.com/content/images/pages/forms/example-app.png" };

It looks like XF's Image is using an HttpClient (perhaps System.Net.Http) that is not aware of the iOS proxy settings.

Can you change this to use the platform-specific networking library that is proxy aware. Or perhaps expose a way for us to specify our own HttpClientHandler for Image? I have success using a custom HttpClientHandler using Paul Betts' ModernHttpClient on Azure's MobileServiceClient and is able to access data hosted in Azure Mobile Services through a proxy server.

This is related to https://bugzilla.xamarin.com/show_bug.cgi?id=25053 where Xamarin Studio cannot download NuGet packages when behind a proxy server.
Comment 1 Rui Marinho 2014-12-03 20:23:21 UTC
Can you gives an example so we can reproduce maybe with a public proxy ? And give details If you are using authentication or not for example.

Thanks.
Comment 2 Jason Smith [MSFT] 2016-03-25 18:50:05 UTC
Thank you for taking the time to submit this feature request. We like this idea and have added it to our internal feature tracking system.

Warm regards,
Xamarin Forms Team