I'm having difficulty loading an image from a URL, when the request goes through a proxy. I have a url that will generate an image which I use to load a BitmapImage ( code below ).
This works great for any of my users that connect directly to the internet, however, if the user is behind a proxy, it will not work. Any ideas would be greatly appreciated, thanks.
BitmapImage bi = new BitmapImage();
bi.DownloadCompleted += new EventHandler( biCap_DownloadCompleted );
bi.DownloadFailed += new EventHandler<ExceptionEventArgs>( biCap_DownloadFailed );
bi.DownloadProgress += new EventHandler<DownloadProgressEventArgs>( biCap_DownloadProgress );
bi.BeginInit();
bi.UriSource = new Uri( myUrl );
bi.UriCachePolicy = new System.Net.Cache.RequestCachePolicy( System.Net.Cache.RequestCacheLevel.Reload );
bi.CacheOption = BitmapCacheOption.None;
bi.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bi.EndInit();