Launch Image URL in Default Browser

If you want to launch a URL in the default browser using C# from something like a Windows Forms application, you would normally just do what I described in this post:

http://devtoolshed.blogspot.com/2008/09/launch-url-in-default-browser-using-c.html



But I found something very surprising. If you attempt to do this with a URL that is a direct path to an image such as this:

http://g-ecx.images-amazon.com/images/G/01/x-locale/common/transparent-p...

For some reason, in IE 7 (and possibly other browsers), it will actually not show the image in the browser. It will open the default browser but it causes a javascript error. The error is the typical and terribly unclear "reference is null" type so no way of knowing what is actually wrong. But if you copy and paste this EXACT URL you just open the browser to into a new browser window, it will load exactly as expected.

I tried running with the UseShellExec property set to true and still it did not work. I tried running by specifying Explore.exe as the Process.Start file name and it still did not work.

I finally just made a page on the site where I was trying to show the image from that would take a URL to the image and load it in a well formed HTML IMG tag. That worked perfectly and as expected.