Solved

property evaluation failed on page.response.end()

Posted on 2010-09-13
1
2,911 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

11 Experts available now in Live!

Get 1:1 Help Now