I have the following code:
var myImage = Image.FromStream(imageStream);
As soon as my application hits this line of code, it throws the following exception:
System.Net.WebException: The request was aborted:
The connection was closed unexpectedly.
Note that my application is on a shared host and exception is only thrown on images files greater than 2MB.
Is there any workaround for this?