I am receiving an error and not sure why. Here is the error:
{Property evaluation failed.}
System.Threading.ThreadAbo
rtExceptio
n: {Property evaluation failed.}
Data: Property evaluation failed.
HelpLink: Property evaluation failed.
InnerException: Property evaluation failed.
Message: Property evaluation failed.
Source: Property evaluation failed.
StackTrace: Property evaluation failed.
TargetSite: Property evaluation failed.
When I remove the Page.Response.End() everything works fine. Do I need it in there?
If File.Exists(imageFile) Then
Dim binStream As FileStream = File.OpenRead(imageFile)
Dim objImage As System.Drawing.Image = System.Drawing.Image.FromStream(binStream)
Page.Response.Write("<html><body style='font-size:10px;margin:0px;padding:0px;padding-left:4px;'>")
Page.Response.Write("<center><span style='color:blue;'>" + Path.GetExtension(imageFile).ToLower().Replace(".", "") + "</span>")
Page.Response.Write(" w: <b>" + objImage.Width.ToString() + "</b> h: <b>" + objImage.Height.ToString() + "</b>")
Page.Response.Write("</center></body></html>")
objImage.Dispose()
binStream.Close()
Page.Response.End()
End If
Open in new window