Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Response.End()

Response.End()

Scheduled Pinned Locked Moved ASP.NET
c++data-structureshelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pss srinivasan
    wrote on last edited by
    #1

    HI Response.End () giving This Error

    Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

    Please How to solve?

    S C 2 Replies Last reply
    0
    • P pss srinivasan

      HI Response.End () giving This Error

      Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

      Please How to solve?

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      This is becasue, the Response.End method ends the page execution and shifts the execution to the Application_EndRequest event in the application's event pipeline. The line of code that follows Response.End is not executed. Resolution: For Response.End, call the HttpContext.Current.ApplicationInstance.CompleteRequest method instead of Response.End to bypass the code execution to the Application_EndRequest event. Find the full detail here: ThreadAbortException [^]

      1 Reply Last reply
      0
      • P pss srinivasan

        HI Response.End () giving This Error

        Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

        Please How to solve?

        C Offline
        C Offline
        carlecomm
        wrote on last edited by
        #3

        Hi, If you use 1. Response.End,you should try ApplicationInstance.CompleteRequest 2. Response.Redirect,please change it to Response.Redirect(String url, bool endResponse),set endResponse as false. For example, Response.Redirect ("nextpage.aspx", false); 3. Server.Transfer,please change it to Server.Execute. Hope this helps:)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups