Solved

Problem with Response.Redirect in .Net 4.0

Posted on 2010-08-16
3
843 Views
Last Modified: 2013-11-27
I am using VS 2010 and .Net 4.0 and when I use the Response.Redirect in code it throws an exception and craps out.  Here is the text of the exception:

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

I've seen a few others complaining about Response.Redirect not working in 2010 either but no solutions.

I'm simply trying to navigate to my main page after confirming the users login/password credentials.  Thank you for any and all help.
0
Comment
Question by:drunk_irishman
[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
  • 2
3 Comments
 
LVL 55

Accepted Solution

by:
Huseyin KAHRAMAN earned 500 total points
ID: 33447581
use server.transfer("newpage.aspx", true"

instead of redirect...
0
 
LVL 55

Expert Comment

by:Huseyin KAHRAMAN
ID: 33447593
dont use redirect if you are trying user to go to another page which is on the same server with page 1

server.transfer("newpage.aspx", true)
0
 
LVL 1

Author Closing Comment

by:drunk_irishman
ID: 33447750
Thanks, very simple.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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