473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with "Cannot redirect after http headers have beent sent" error

In my Page_Load Method, I call a method by asynchronous callback to do some work. It's working fine until it calls back. Here is the problem in my callback method. Basically, I cannot redirect because it keeps on saying that the http headers has already been sent. It looks like it keeps on telling me that the response is complete. So nothing it could do about it. I really don't understand. Here is my code (in the callback method):

//this.CurrentContext.Response.Clear();
this.CurrentContext.Response.Redirect(this.Current Context.Request.ApplicationPath+"/DesktopDefault.aspx?tabindex="+this.CurrentContext .Request.Params["tabindex"]+"&tabid="+this.CurrentContext.Request.Params["tabid"]);

As you could see, I tried to clear the response first as well. Then the response.redirect won't even be evaluated.

If anyone has answer to this, please let me know. Thank you so much in advance

Also, if you anyone could provide or direct me to explanation of what's going on when I use thread in ASP.NET, I'd be really appreciated. Thank you.
Nov 18 '05 #1
1 3244
Turns out the aspnet_client folder did not exist under the root of our site.
Once we added it, things started working.

"chsakda" <an*******@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
In my Page_Load Method, I call a method by asynchronous callback to do some work. It's working fine until it calls back. Here is the problem in my
callback method. Basically, I cannot redirect because it keeps on saying
that the http headers has already been sent. It looks like it keeps on
telling me that the response is complete. So nothing it could do about it. I
really don't understand. Here is my code (in the callback method):
//this.CurrentContext.Response.Clear();
this.CurrentContext.Response.Redirect(this.Current Context.Request.Applicatio
nPath+"/DesktopDefault.aspx?tabindex="+this.CurrentContext .Request.Params["t
abindex"]+"&tabid="+this.CurrentContext.Request.Params["tabid"]);
As you could see, I tried to clear the response first as well. Then the response.redirect won't even be evaluated.
If anyone has answer to this, please let me know. Thank you so much in advance.
Also, if you anyone could provide or direct me to explanation of what's

going on when I use thread in ASP.NET, I'd be really appreciated. Thank you.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Seagull Manager | last post by:
Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions on apache manual and php manual (as far as I can see), but getting "internal server error" in browser... log says "Premature...
8
by: Jerry | last post by:
Hi All How can I produce an output to the browser and let the script continue to work in the background, producing a later screen output? Example: Trigger a database search so that the user...
1
by: VitorJOL | last post by:
Hello I have a listbox with a datasource.I want to remove a row from listbox but not remove it from the database. How can i do this ? PROBLEM:"Cannot modify the Items collection when the...
0
by: didierwork | last post by:
Hi folks, A question about throwing a SoapException from a SoapExtension. We have created a SoapExtension to implement our own user authaurization/authentication scheme. It all works great, when...
0
by: Didier | last post by:
Hi folks, A question about throwing a SoapException from a SoapExtension. We have created a SoapExtension to implement our own user authaurization/authentication scheme. It all works great, when...
1
by: ashluvcadbury | last post by:
Hi all I have visual studio 2003 and also configured IIS.But not able to execute any web application. I am a beginner and all the small web applications I had made some days days ago were...
6
by: dragiton | last post by:
ASP Code Redirect Error Hello I recently relaunched a website containing asp code which used to work perfectly. However, after resetting up the SQL DB and trying to work out some site bugs I have...
1
by: bruce | last post by:
i'm getting the following error: mechanize._response.httperror_seek_wrapper: HTTP Error 500: i'm running python 5.1 and mechanize 0.1.7b I have no idea as to what I have to...
3
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude...
0
scubak1w1
by: scubak1w1 | last post by:
Hello, Gor some new hardware, Windows Server 2008 with IIS 7; I have full admin access... but am new to IIS 7... :-) I am trying to get Python running under IIS 7 so I can use TileCache: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.