I got a hard time with the Image.FromStream method in my website. The code below works perfect on my computer. But when I uploaded it to the test server, it always gives me "Parameter not valid" exception.
if (!afuImageFile.IsUploading && afuImageFile.HasFile)
{
System.Drawing.Image imgFile = System.Drawing.Image.FromStream(afuImageFile.FileContent);
}
the afuImageFile
is an AsynFileUploader
control in Ajax Tool Kits. afuImageFile.FileContent
is a HttpInputStream
. I guess I need to add some permission to some folder. Can anyone help me?