Solved

property evaluation failed on page.response.end()

Posted on 2010-09-13
1
2,970 Views
Last Modified: 2013-11-26
I am receiving an error and not sure why. Here is the error:
{Property evaluation failed.}
    System.Threading.ThreadAbortException: {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

0
Comment
Question by:wilcor14
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 500 total points
ID: 33665600
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question