Sep 29, 2014 08:45 AM|PatriceSc|LINK
Redirect can't be used if you already sent some content (this information is part of an HTTP header and there is no point in sending some content if this is to move away immediately somewhere else).
Anyway as you are sending back non html content type, the code you shown should trigger an open/save as dialog without replacing the current HTML markup shown in the browser (as what you sent is not text/html content). So there is no point to redirect somewhere
are anyway you don't move away from what you previously shown.
What is the problem if you don't redirect at all ? What is this processing? Is this something you do or is this some kind of behavior that is unexpected? We would need then to better understand what is the bad behavior you see to be able to suggest how to
fix it (a redirection being liekly not the way to solve that).
Ah could it be that you still send some HTML markup after having sent the Excel content?