473,320 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 6647
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
by: josef | last post by:
i would like to capture the server variables from a remote server in our org. is this possible ??
2
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.