.NETGURU
Odd and Puzzling Error
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcache' list.


Stephen Trudel
-- Moved from [aspngfreeforall] to [aspngcache] by Marcie Jones <Click here to reveal e-mail address> --

i am storing loaded user controls in the Cache object. i can turn the
feature on and off with a Web.Config setting. when i am using objects from
Cache is seems to be affecting my response HTTP headers. the error message
upon doing a Context.Response.Redirect is:

"Cannot redirect after HTTP headers have been sent."

i do not get this error when NOT loading from the Cache object! Buffer is
set to true. ANY IDEAS?????????

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Reply to this message...
 
    
Paul Brenner
Before doing the redirect, use the following code:
    Context.Response.Clear()
'Redirect' works by setting the HTTP response code to 302 (Object moved) and
sending 'Location: <new url>' as the response content. This doesn't work
when there are already headers sent (which is a gotcha when trying to set a
cookie and redirecting at the same time).

-----Original Message-----
From: Stephen Trudel [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 9:10 AM
To: aspngcache
Subject: [aspngcache] Odd and Puzzling Error

-- Moved from [aspngfreeforall] to [aspngcache] by Marcie Jones
<Click here to reveal e-mail address> --

i am storing loaded user controls in the Cache object. i can turn the
feature on and off with a Web.Config setting. when i am using objects from
Cache is seems to be affecting my response HTTP headers. the error message
upon doing a Context.Response.Redirect is:

"Cannot redirect after HTTP headers have been sent."

i do not get this error when NOT loading from the Cache object! Buffer is
set to true. ANY IDEAS?????????

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

| [aspngcache] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngcache.asp = JOIN/QUIT
Reply to this message...
 
    
Stephen Trudel
i am still getting the same error with Clear() before the Redirect. i
wonder if the error message is misleading. can't imagine why using the
Cache object would affect the headers.

----Original Message Follows----
From: Paul Brenner <Click here to reveal e-mail address>
Reply-To: "aspngcache" <Click here to reveal e-mail address>
To: "aspngcache" <Click here to reveal e-mail address>
Subject: [aspngcache] RE: Odd and Puzzling Error
Date: Wed, 27 Mar 2002 11:13:31 -0500

Before doing the redirect, use the following code:
    Context.Response.Clear()
'Redirect' works by setting the HTTP response code to 302 (Object moved) and
sending 'Location: <new url>' as the response content. This doesn't work
when there are already headers sent (which is a gotcha when trying to set a
cookie and redirecting at the same time).

-----Original Message-----
From: Stephen Trudel [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 9:10 AM
To: aspngcache
Subject: [aspngcache] Odd and Puzzling Error

-- Moved from [aspngfreeforall] to [aspngcache] by Marcie Jones
<Click here to reveal e-mail address> --

i am storing loaded user controls in the Cache object. i can turn the
feature on and off with a Web.Config setting. when i am using objects from
Cache is seems to be affecting my response HTTP headers. the error message
upon doing a Context.Response.Redirect is:

"Cannot redirect after HTTP headers have been sent."

i do not get this error when NOT loading from the Cache object! Buffer is
set to true. ANY IDEAS?????????

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

| [aspngcache] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngcache.asp = JOIN/QUIT

| [aspngcache] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngcache.asp = JOIN/QUIT

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply to this message...
 
 
System.Runtime.Remoting.Contexts.Context




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification