IE8 Beta 1 breaks Image Download in WPF applications

I ran into this issue when IE8 was first released and it doesn't seem to have gotten much visibility elsewhere. IE8 Beta 1 breaks image downloads for WPF applications when the image has a web uri. From the stack trace this seems to be caused by wininet.dll not returning the internet cache folder correctly. A typical call stack for the error message might look something like this (when the uri specified is a http uri, I haven't checked FTP)

A first chance exception of type 'System.ArgumentException' occurred in PresentationCore.dll
System.ArgumentException: Value does not fall within the expected range.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at MS.Win32.WinInet.get_InternetCacheFolder()
   at System.Windows.Media.Imaging.BitmapDownload.BeginDownload(BitmapDecoder decoder, Uri uri, RequestCachePolicy uriCachePolicy, Stream stream)
   at System.Windows.Media.Imaging.LateBoundBitmapDecoder..ctor
   (Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy requestCachePolicy)
   at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream
   (Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
   at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapImage.EndInit()

It seems that others have also noticed and reproduced this error on both XP and Vista. In general image downloading seems to be one of the more perilous operations for WPF to perform. I've seen a number of other process-terminating exceptions caused by images with invalid formats etc, so it is best to be cautious. For this problem caused by IE8 "manually" constructing a web request and downloading the image yourself, and then creating a BitmapImage from the downloaded stream works and does not cause the error.

Categories:

posted 5/12/2008 8:05:59 PM

 

Comments:

#

adult datting

posted by dfg on 11/19/2008 8:09:52 PM :

http://adultdatefinder.pornlivenews.com adult date finder

#

dsdsf

posted by sdfg on 11/24/2008 7:43:19 PM :

http://sexdatinginusa.pornlivenews.com Sex dating in USA
http://sexdatinginusa.pornlivenews.com/articles/596436/meet-women-in-miami-florida meet women in florida
http://sexdatinginusa.pornlivenews.com/articles/596433/adult-dating-in-south-carolina adult dating in Corolina
http://sexdatinginusa.pornlivenews.com/articles/596422/sex-date-in-united-states sex date in usa

#

sddss

posted by dssdds on 12/17/2008 5:25:39 PM :

http://freelesbianssexvideos.thumblogger.com/home/log/2008/51/lesbian-analingus-movie.html

#

Ed Hardy Clothing

posted by Ed Hardy Clothing on 10/15/2009 1:11:12 PM :

http://www.brandname-clothing.com">http://www.brandname-clothing.com
http://www.brandname-clothing.com">http://www.brandname-clothing.com



#

links of london

posted by links of london on 10/27/2009 7:15:56 PM :

It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.

#

www.nikejordansale.com

posted by mbt shoes clearance on 11/21/2009 5:26:50 AM :

welcome to our website:http://www.nikejordansale.com ,we hope become your reliable online cheap goods supplier in china.Authentic goods with original box,we insists tha"Customer the highest,Quality first!"Our products include mbt shoes clearance,ugg classic tall sale,mens air jordan shoes and other cheap goods.We are looking forward to building sincere and long-term business relationships with you.

#

uggs on sale

posted by uggs on sale on 11/25/2009 7:52:37 PM :

S11125L2UGG popular star in Hollywood several years ago had spread to uggs on sale mean the improvement of people's lives and as a force to follow the ugg boots uk star to wear UGG's wave of school is becoming everyone's most interesting content. Here Ai Sa Kaka on the boots on sale popular UGG fashion for up to one sorted out a set of current Hollywood's most sought-after actress of the ugg bailey boots UGG shoes, street beat, let's take a look at what they are wearing UGG's Bar. http://www.uggbootssaleonline.com

#

timberland work boots

posted by timberland work boots on 11/26/2009 2:24:29 AM :

S11125I2 The son of wealthy and influential Athenian parents, Plato began his timberland chukka boots philosophical career as a student of Socrates. When the master died, Plato travelled timberland waterproof boots to Egypt and Italy, studied with students of Pythagoras, and spent timberland work boots several years advising the ruling family of Syracuse. Eventually, he returned timberland custom boots to Athens and established his own school of philosophy at the Academy.For students enrolled there, Plato tried timberland high top boots both to pass on the heritage of a Socratic style of thinking and to guide their progress through mathematical learning to the achievement of abstract philosophical truth. http://www.officalsale.com/specials.html

#

http://www.ladyugs.com/specials.html

posted by Ugg Classic Boots on 11/26/2009 1:18:51 PM :

S11125H2 Towering genius disdains a beaten path with discount ugg boots. It seeks regions hitherto unexplored.A man may lead a horse to the water, but he cannot make it drink and walk with ugg classic tall .Victory wil not come to ugg lo pro button unless I go to ugg classic cardy.Goals determine what you are going to ,for example, buy ugg knightsbridge.http://www.ladyugs.com/specials.html

#

uggs on sale

posted by uggs on sale on 11/28/2009 7:32:25 PM :

S11128L2UGG popular star in Hollywood several years ago had spread to uggs on sale mean the improvement of people's lives and as a force to follow the ugg boots uk star to wear UGG's wave of school is becoming everyone's most interesting content. Here Ai Sa Kaka on the boots on sale popular UGG fashion for up to one sorted out a set of current Hollywood's most sought-after actress of the ugg bailey boots UGG shoes, street beat, let's take a look at what they are wearing UGG's Bar. http://www.uggbootssaleonline.com

#

ed hardy clothing,ed hardy coat

posted by edfashionclothes on 12/5/2009 1:27:04 PM :

Thank you for the message!With the advent of Christmas and to enlarge and refresh our market,we encourage both newcomers and loyal customers to browse our ugg boots sale promotions.The price of our ugg classic argyle knit,ugg bailey button or ugg classic cardy are lowest than anytime and anywhere,there are also lots ugg mayfaire boots and ugg sundance II boots that you can choose.If the goods you choose are more than $100,you can pick up a gift Free.Time Limited, Don't be hesitation,pick up your favorate goods,Free Shipping & Fast Delivery.http://www.edfashionclothes.com/

#

ugg bailey button,ugg classic argyle knit boots

posted by nikeaf1jordanshoes on 12/5/2009 1:27:18 PM :

Good job!Thank you for your message!It help me so much! Christmas is coming,there are big sales promotions on http://www.nikeaf1jordanshoes.com/,ugg bailey button and ugg classic argyle knit boots on our site are lower than ever,you may be intersting in ugg mayfaire boots or ugg nightfall boots,ugg sundance II ,come on to choose your favorate goods!


#

ugg bailey button,ugg classic Boots

posted by uggsnowbootsbest on 12/5/2009 1:27:33 PM :

Thank you for the great job!In order to?welcome to Christmas, recently,our company is on ugg boots promotional sales and the?prices of all products such as?ugg sundance II boots or ugg bailey button boots are lower than any time!And the biggest surprise is that?you can buy one get one free,that?is once you buy an ugg mayfaire boots , ugg coquette, or ugg classic crochet,you can get one gift for free.Don't hesitate, to get?a free present, check it on http://www.uggsnowbootsbest.com/


#

timberland high top boots

posted by timberland chukka boots on 12/5/2009 4:04:06 PM :

S11205I2
The son of wealthy and influential Athenian parents, Plato began his timberland chukka boots philosophical career as a student of Socrates. When the master died, Plato travelled timberland waterproof boots to Egypt and Italy, studied with students of Pythagoras, and spent timberland work boots several years advising the ruling family of Syracuse. Eventually, he returned timberland custom boots to Athens and established his own school of philosophy at the Academy.For students enrolled there, Plato tried timberland high top boots both to pass on the heritage of a Socratic style of thinking and to guide their progress through mathematical learning to the achievement of abstract philosophical truth. http://www.officalsale.com/specials.html

#

http://www.watchgy.com/

posted by replica rolex on 12/21/2009 6:21:55 PM :

$75 Replica <a href=http://www.watchgy.com/>Rolex">http://www.watchgy.com/>Rolex Watches</a> sale, Our site provides <a href=http://www.watchgy.com/>Rolex">http://www.watchgy.com/>Rolex replica</a>, <a href=http://www.watchgy.com/>replica Rolex</a> Watches, <a href=http://www.watchgy.com/breitling-c-17.html/>replica breitling</a>, <a href=http://www.watchgy.com/cartier-c-18.html/>replica Cartier</a>, <a href=http://www.watchgy.com/omega-c-20.html/>replica Omega</a>, <a href=http://www.watchgy.com/tag-heuer-c-24.html/>Tag Heuer Watches</a>. . .more than 100 famous <a href=http://www.watchgy.com/>rolex</a> brands"
<a href=http://www.watchgy.com/rolex-air-king-c-1.html>rolex air king</a>
<a href=http://www.watchgy.com/rolex-datejust-c-9.html>rolex datejust</a>
<a href=http://www.watchgy.com/rolex-day-date-c-7.html>rolex day date</a>
<a href=http://www.watchgy.com/rolex-daytona-c-6.html>rolex daytona</a>
<a href=http://www.watchgy.com/rolex-gmt-c-11.html>rolex gmt</a>
<a href=http://www.watchgy.com/rolex-submariner-c-8.html>rolex submariner</a>
<a href=http://www.watchgy.com/rolex-yachtmaster-c-13.html>rolex yachtmaster</a>
<a href=http://www.watchgy.com/a-lange-sohne-c-14.html>a lange sohne watches</a>
<a href=http://www.watchgy.com/alain-silberstein-c-23.html>alain silberstein watches</a>
<a href=http://www.watchgy.com/bell-ross-c-15.html>bell ross watches</a>
<a href=http://www.watchgy.com/breguet-c-16.html>breguet watches</a>
<a href=http://www.watchgy.com/breitling-c-17.html>breitling watches</a>
<a href=http://www.watchgy.com/bvlgari-c-25.html>bvlgari watches</a>
<a href=http://www.watchgy.com/cartier-c-18.html>cartier watches</a>
<a href=http://www.watchgy.com/omega-c-20.html>omega watches</a>
<a href=http://www.watchgy.com/patek-philippe-c-22.html>patek philippe watches</a>r

#

CHEAP AION GOLD

posted by aion gold on 1/5/2010 4:31:06 PM :

http://www.gamevive.com/
http://www.gmbar.com/
http://www.aionrealm.com/
http://www.aioneden.com/

#

Cardy Ugg Boots

posted by Cardy Ugg Boots on 1/8/2010 4:31:54 PM :

slLAH100108 I think this blog is good,so now I wanna introduce mbt to you.{{[MBT Chapa shoes->http://www.cutembt.com/mbt-chapa-shoes-c-71.html]}} are a growing and popular anti-shoe inspired by the Masai people. The Masai people are known for their athletic posture and gait. It is known that none of the Masai people struggle with any back pain due to walking on hard surfaces,so they try {{[MBT Women M.Walk shoes->http://www.cutembt.com/mbt-women-mwalk-shoes-c-42.html]}}. At last,they found the benefit of MBT Women M.Walk shoes, they trust mbt shoes.

#

ugg cardy sela

posted by ugg cardy on 1/28/2010 12:15:37 PM :

Discount Ugg Boots On www.souggs.com
ugg cardy http://www.souggs.com/ugg-classic-cardy-c-2.html">http://www.souggs.com/ugg-classic-cardy-c-2.html
ugg boot http://www.souggs.com/
UGG Bailey Button http://www.souggs.com/ugg-bailey-button-c-24.html
UGG Classic Cardy http://www.souggs.com/ugg-classic-cardy-c-2.html">http://www.souggs.com/ugg-classic-cardy-c-2.html
UGG Classic Tall http://www.souggs.com/ugg-classic-tall-c-3.html
UGG Classic Short http://www.souggs.com/ugg-classic-short-c-1.html
UGG 5116 Mayfaire http://www.souggs.com/ugg-5116-mayfaire-c-29.html
UGG Classic Crochet http://www.souggs.com/ugg-classic-crochet-c-9.html
UGG Classic Mini http://www.souggs.com/ugg-classic-mini-c-6.html
UGG Nightfall http://www.souggs.com/ugg-nightfall-c-4.html
UGG Rainier http://www.souggs.com/ugg-rainier-c-22.html
uggs boots http://www.souggs.com/specials.html
uggs http://www.souggs.com/products_all.html
ugg australia http://www.souggs.com/page_2.html
ugg boots http://www.souggs.com/contact_us.html
cardy boots http://www.souggs.com/shippinginfo.html

 

Name:
 
Url (optional):
 
Subject:
 
Comment:
 

Enter Captcha Validation:
(If you cannot read the Captcha image, press "Reset Image" to generate a new one)