473,508 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.ServerVariables Question

Hi,

I've got a question regarding the usage of Request.ServerVariables.
I'm not sure this is really a ASP question, so redirects to a more
appropriate newsgroup are welcome.

I have a variable that is being passed to me through HTTP headers
called "Test." I am able to see this variable and its value when I use
Request.ServerVariables("ALL_HTTP"). Additionally, when I iterate
through Request.ServerVariables using a "For Each key in
Request.ServerVariables" the key of "Test" comes up. However, when I
use Request.ServerVariables("Test"), the value returned to me is
always empty. One workaround thats been suggested by the person
sending me the header is to simply parse the contents of "ALL_HTTP" to
retrieve the data I want. This is doable, but I'm curious to know why
exactly the value of Request.ServerVariables("Test") comes up empty
when I can plainly see there is a value in the "ALL_HTTP" dump?

Thanks in advance!
Jul 19 '05 #1
2 6662
The ALL_HTTP info is news to me, but this should answer why there isn't a
custom header:

http://www.aspfaq.com/2261


"W. Loo" <wl****@hotmail.com> wrote in message
news:33**************************@posting.google.c om...
Hi,

I've got a question regarding the usage of Request.ServerVariables.
I'm not sure this is really a ASP question, so redirects to a more
appropriate newsgroup are welcome.

I have a variable that is being passed to me through HTTP headers
called "Test." I am able to see this variable and its value when I use
Request.ServerVariables("ALL_HTTP"). Additionally, when I iterate
through Request.ServerVariables using a "For Each key in
Request.ServerVariables" the key of "Test" comes up. However, when I
use Request.ServerVariables("Test"), the value returned to me is
always empty. One workaround thats been suggested by the person
sending me the header is to simply parse the contents of "ALL_HTTP" to
retrieve the data I want. This is doable, but I'm curious to know why
exactly the value of Request.ServerVariables("Test") comes up empty
when I can plainly see there is a value in the "ALL_HTTP" dump?

Thanks in advance!

Jul 19 '05 #2
"W. Loo" <wl****@hotmail.com> wrote in message
news:33**************************@posting.google.c om...
Hi,

I've got a question regarding the usage of Request.ServerVariables.
I'm not sure this is really a ASP question, so redirects to a more
appropriate newsgroup are welcome.

I have a variable that is being passed to me through HTTP headers
called "Test." I am able to see this variable and its value when I use
Request.ServerVariables("ALL_HTTP"). Additionally, when I iterate
through Request.ServerVariables using a "For Each key in
Request.ServerVariables" the key of "Test" comes up. However, when I
use Request.ServerVariables("Test"), the value returned to me is
always empty. One workaround thats been suggested by the person
sending me the header is to simply parse the contents of "ALL_HTTP" to
retrieve the data I want. This is doable, but I'm curious to know why
exactly the value of Request.ServerVariables("Test") comes up empty
when I can plainly see there is a value in the "ALL_HTTP" dump?

Thanks in advance!


Any variables not natively enumerated into the ServerVariables
collection should be accessed by prefixing with "HTTP_" or "HEADER_". In
your case:

Request.ServerVariables("HTTP_Test")

Here's a link to the documentation for the ServerVariables collection
http://msdn.microsoft.com/library/en...om_reqocsv.asp

HTH
-Chris Hohmann
Jul 19 '05 #3

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

Similar topics

6
703
by: josef | last post by:
i would like to capture the server variables from a remote server in our org. is this possible ??
2
14017
by: JW | last post by:
I use Request.ServerVariables("HTTP_REFERER") to get the URL of the referrer page. However, if the page that has Request.ServerVariables("HTTP_REFERER") is in a popup window then the value is...
3
9770
by: crjunk | last post by:
I have the following url: https://test.mywebsite.com/secure/programs/test.asp?TOPIC_ID=21 How can I get the value "secure/programs/test.asp?TOPIC_ID=21" I can't use...
1
9032
by: jgamble | last post by:
Hi, Here's a question for you all. Under "classic" ASP any ASP page could have any number of #Include files. Using #Include files I could have functions which were common to my whole site and...
2
1647
by: TS | last post by:
I seem to remember reading somewhere that accessing this collection is expensive and you should avoid it if possible. Are there any alternatives to the following: Request.ServerVariables; ...
8
8122
by: nsyforce | last post by:
Can you add a header to a request in an http module? I'm trying unsuccessfully. Here's an example of my code: public void Init(HttpApplication r_objApplication) { ...
1
2776
by: preet | last post by:
I posted this elsewhere ; probably the wrong place so i am posting this again I am using the following script: hrefer=Request.Servervariables("HTTP_REFERER")...
1
4484
by: Christian Blackburn | last post by:
Hi Gang, I'm using the following code to generate a complete URL: Session("Destination") = Request.ServerVariables("Path_Info") & "?" & Request.ServerVariables("QUERY_STRING") However that...
2
4105
by: Henry Stock | last post by:
I don't seem to understand how to use the value: Request.ServerVariables("remote_addr") I am trying to pass the ip address of a sending web client in the body of an email message. When I...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7336
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
7405
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
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
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,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.