Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Not able view Custom Headers in ASP.NET

Reply
Thread Tools

Not able view Custom Headers in ASP.NET

 
 
Jacky
Guest
Posts: n/a
 
      11-21-2003
hi,

I am trying to view the custom headers in an ASP.NET page.
I am able to view all the standard headers using the
method Request.Headers.Get(). But if i set a custom header
using Response.AddHeader("ID","value"), the key or value
doesnt appear in the Request.Headers collection. What
could be reason to this problem?

Does ASP.NET support setting and viewing custom http
headers. If yes, how do i simulate creating and viewing it
in my code.

Thanks in advance.


 
Reply With Quote
 
 
 
 
Keith Patrick
Guest
Posts: n/a
 
      11-21-2003
It won't appear in the request until the response has actually occured,
meaning you need to append the header, let the page finish whatever it was
doing, and then grab the header on the next postback. BTW: It looks like if
you do a Response.Redirect that the appended headers get discarded.


 
Reply With Quote
 
 
 
 
Jacky
Guest
Posts: n/a
 
      11-21-2003
Thanks Keith,

how do i acheive this, without using a Response.Redirect


>-----Original Message-----
>It won't appear in the request until the response has

actually occured,
>meaning you need to append the header, let the page

finish whatever it was
>doing, and then grab the header on the next postback.

BTW: It looks like if
>you do a Response.Redirect that the appended headers get

discarded.
>
>
>.
>

 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      11-22-2003
"Jacky" <(E-Mail Removed)> wrote in message
news:0cac01c3b04d$2c4537d0$(E-Mail Removed)...
> hi,
>
> I am trying to view the custom headers in an ASP.NET page.
> I am able to view all the standard headers using the
> method Request.Headers.Get(). But if i set a custom header
> using Response.AddHeader("ID","value"), the key or value
> doesnt appear in the Request.Headers collection. What
> could be reason to this problem?


Why would Response.AddHeader affect Request.Headers? Response.AddHeader adds
a header to the outgoing response. Request.Headers is the headers which were
sent with the request. These two have nothing to do with each other.

Perhaps you're confusing headers with cookies?
--
John Saunders
John.Saunders at SurfControl.com


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to display color in excel not able to display color in excel using xml sed_y XML 0 02-15-2012 09:46 PM
Not able to view computers on network =?Utf-8?B?aGFwcHlkdWRl?= Wireless Networking 2 08-10-2007 01:32 PM
XML FILE as datasource to Grid view..? not able to remove the nodes..? =?iso-8859-1?Q?=BF_Mahesh_Kumar?= ASP .Net 0 10-14-2005 10:47 AM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi ASP .Net Web Controls 1 07-06-2004 03:15 PM
not able to view some websites Ennc Computer Support 4 06-21-2004 11:12 PM



Advertisments