Click here to Skip to main content
15,887,939 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionNeed Help ! Please Pin
eslam soliman15-Jun-10 0:00
eslam soliman15-Jun-10 0:00 
AnswerRe: Need Help ! Please Pin
Peace ON15-Jun-10 1:20
Peace ON15-Jun-10 1:20 
GeneralRe: Need Help ! Please Pin
eslam soliman15-Jun-10 1:41
eslam soliman15-Jun-10 1:41 
GeneralRe: Need Help ! Please Pin
eslam soliman15-Jun-10 21:41
eslam soliman15-Jun-10 21:41 
AnswerRe: Need Help ! Please Pin
Sandeep Mewara15-Jun-10 1:21
mveSandeep Mewara15-Jun-10 1:21 
GeneralRe: Need Help ! Please Pin
eslam soliman15-Jun-10 1:35
eslam soliman15-Jun-10 1:35 
AnswerRe: Need Help ! Please Pin
dan!sh 15-Jun-10 2:09
professional dan!sh 15-Jun-10 2:09 
QuestionHelp With ASP.NET Wrappers [modified] Pin
Sachin Bedraman14-Jun-10 23:11
Sachin Bedraman14-Jun-10 23:11 
Is it possible to use Response.Redirect after Response.Flush() has been called.

I am using an HttpModule, which is configured with a custom response filter to capture
the HTML output. This filter redirects depending upon detection of certain pattern in the HTML output.
It used to work fine. One day I tried calling Response.Flush() in one of the requested ASP.NET pages.
While redirecting in the filter, it gave the below error.

Cannot redirect after HTTP headers have been sent.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Cannot redirect after HTTP headers have been sent.

After some amount of research, i found that, redirection cannot be done after response has been committed.
This also happens in case of J2EE applications. But that behaviour can be controlled by using wrappers..



Later I found that ASP.NET also has some wrappers. But I was not able to achieve what I was trying.

Is it possible to change the default behaviour by usage of wrappers?. What I mean is to prevent the
response from being sent to the browser, so that I can perform redirection.

I am using Visual Studio Express 2010 with .net framework 4.0

Regards,
Sachin

modified on Thursday, June 17, 2010 1:40 AM

QuestionWindows Login - Pop up Pin
Ramkithepower14-Jun-10 22:21
Ramkithepower14-Jun-10 22:21 
AnswerRe: Windows Login - Pop up Pin
Manas Bhardwaj14-Jun-10 22:51
professionalManas Bhardwaj14-Jun-10 22:51 
AnswerRe: Windows Login - Pop up Pin
Sandeep Mewara15-Jun-10 1:22
mveSandeep Mewara15-Jun-10 1:22 
Question.Net Mailbox unavailable. Relaying Denied... Pin
samsonx14-Jun-10 21:32
samsonx14-Jun-10 21:32 
AnswerRe: .Net Mailbox unavailable. Relaying Denied... Pin
Eduard Keilholz15-Jun-10 21:43
Eduard Keilholz15-Jun-10 21:43 
QuestionTracking client machines Pin
xavier999914-Jun-10 21:01
xavier999914-Jun-10 21:01 
QuestionFusion Charts Pin
KhandelwalA14-Jun-10 20:56
KhandelwalA14-Jun-10 20:56 
QuestionHow to visualize postback data? Pin
Tridip Bhattacharjee14-Jun-10 20:49
professionalTridip Bhattacharjee14-Jun-10 20:49 
AnswerRe: How to visualize postback data? Pin
Peace ON15-Jun-10 0:57
Peace ON15-Jun-10 0:57 
QuestionExporting Via Asp.net Pin
SreejithKumar M14-Jun-10 20:31
SreejithKumar M14-Jun-10 20:31 
QuestionHow to show Images while sorting master and child Gridviews(Nested Gridview)? Pin
Pawan Kiran14-Jun-10 19:41
Pawan Kiran14-Jun-10 19:41 
QuestionDistributing Web Services on Differing Servers Pin
starcad14-Jun-10 11:39
starcad14-Jun-10 11:39 
AnswerRe: Distributing Web Services on Differing Servers Pin
Manas Bhardwaj14-Jun-10 23:12
professionalManas Bhardwaj14-Jun-10 23:12 
QuestionCan not do putObjectInline operation Using Amazon S3 Pin
vsaratkar14-Jun-10 11:03
vsaratkar14-Jun-10 11:03 
QuestionUpload Asp.Net c# MySQL site Pin
Dot-Net-Dev14-Jun-10 6:04
Dot-Net-Dev14-Jun-10 6:04 
AnswerRe: Upload Asp.Net c# MySQL site Pin
Not Active14-Jun-10 7:20
mentorNot Active14-Jun-10 7:20 
AnswerRe: Upload Asp.Net c# MySQL site Pin
jyoti21014-Jun-10 18:24
jyoti21014-Jun-10 18:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.