Solved

property evaluation failed on page.response.end()

Posted on 2010-09-13
1
2,922 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
1 Comment
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 500 total points
ID: 33665600
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now