View Complete Post
I'm in the middle of migrating servers and on the new server Response.Redirect is extremely slow. It takes around 20 seconds for the browser to get the redirect. This is something that was quick on the existing server. It's an ASP.NET 2.0 application, both servers are running IIS6.
Additionally, if I "manually" do the redirect, it's fast. For example:
takes around 20 seconds on the new server
Response.Status = "302 Moved Temporarily";Response.AddHeader("Location", url);Response.End();
is fast on the new server.
Any ideas why Response.Redirect would be so slow on the new server?
I need to open a new window with Response.Redirect, Is it possible?
Hello, I will try to be as clear as I can be. I'm sure this question has been asked but I can't find a suitable answer for this particular situation.
I need to be able to redirect the browser to a new 3rd party page while at the same time supplying a cookie required for some form of authentication on the 3rd party site.
I have managed to get this to work in the following manner:
'SessionID is predetermined by another HttpWebRequest/Response
Dim sessionCookie As New Cookie("ezproxy", sessionID.Substring(1), "/", ".someother.site")
Dim CookieJar As New CookieContainer
rRequest = HttpWebRequest.Create("where I want to go")
rRequest.CookieContainer = CookieJar
rRequest.Method = "GET"
'Make the request and get the response.
rResponse = rRequest.GetResponse()
If (rResponse.Cookies.Count <> 0) Then
For Each cook
VS 2005, AJAX
I use gridview and I need single and double click for each row in gridview.
When I click once on a row, some action will execute (e.g. next button should be enabled) and when I double click the row there should be redirection to another page.
I used the code below for both single and double click usage:
ÃÂ'm writing an IHttpModule to catch the 404 error:
public void Init(HttpApplication context)
context.Error += new EventHandler(OnError);
public void OnError(Object source, EventArgs e)
HttpContext context = ((HttpApplication)source).Context;
For some reason the Redirect is completely ignored? (the statement is reached and executed when debugging, but nothing happens)
Thanks in advance
Recently i upgraded to VS2010 RC1 and ASP.NET 4 RC1.
My old code Response.Redirect("~/iSolutions_Home.aspx") worked perfectly fine even in beta 2, however in RC1 the redirect did this:
and i got the following error:
Server Error in '/WinComm_iSolutions_2010' Application.
HTTP Error 400 - Bad Request.
Version Information: ASP.NET Development Server 10.0.0.0
Please kindly assist.
Thank you in advance.
Here's the scenario.
I've got a form with a button on it. You have to be logged in to see this form. I use this code to check if the user is logged in and act appropriatley.
Dim isLoggedIn As Boolean = CType(Session("LoggedIn"), Boolean) If isLoggedIn = False Then Response.Redirect("Login.aspx") End If
The button runs a report that takes anywhere from 0.5 to 20 seconds. For testing it just sleeps for 10 seconds.
The problem is this. Say User1 comes to the form, logs in and runs the report. If User2 comes to the form, the page will not load until User1's report is done.
Now, the bonus is if I comment out the response.redirect line, everything works fine. But if that line is in there I will get this problem.
My quesiton is why is this happening? What's going on in the background that's causing this? Any way around it?