473,585 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.ServerV ariables Question

Hi,

I've got a question regarding the usage of Request.ServerV ariables.
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.ServerV ariables("ALL_H TTP"). Additionally, when I iterate
through Request.ServerV ariables using a "For Each key in
Request.ServerV ariables" the key of "Test" comes up. However, when I
use Request.ServerV ariables("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.ServerV ariables("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 6684
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.goo gle.com...
Hi,

I've got a question regarding the usage of Request.ServerV ariables.
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.ServerV ariables("ALL_H TTP"). Additionally, when I iterate
through Request.ServerV ariables using a "For Each key in
Request.ServerV ariables" the key of "Test" comes up. However, when I
use Request.ServerV ariables("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.ServerV ariables("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.goo gle.com...
Hi,

I've got a question regarding the usage of Request.ServerV ariables.
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.ServerV ariables("ALL_H TTP"). Additionally, when I iterate
through Request.ServerV ariables using a "For Each key in
Request.ServerV ariables" the key of "Test" comes up. However, when I
use Request.ServerV ariables("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.ServerV ariables("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.ServerV ariables("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
14040
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 blank!! Can anone assist as to how to solve this problem. The requesting page is at http://www.theexperts.co.uk/error.htm
3
9772
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 Request.ServerVariables("HTTP_REFERER") because the user may have the web page bookmarked. I've also tried Request.ServerVariables("URL") but this only gave me...
1
9046
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 these files had access to the Request, Session and Server objects from the page they were included on. How can this be done under .NET? My...
2
1653
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; Request.ServerVariables; Request.ServerVariables; Request.ServerVariables;
8
8134
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) { r_objApplication.EndRequest += new EventHandler(this.EndRequest) }
1
2785
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") hrhost=Request.Servervariables("REMOTE_HOST") hruagent=Request.Servervariables("HTTP_USER_AGENT") hriisid=Request.Servervariables("INSTANCE_ID")...
1
4489
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 seems like a lot of work. Is there one command coming off the request object that'll acomplish this? Thanks,
2
4116
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 compile the following code I get the this error message: Error 1 'System.Web.HttpRequest.ServerVariables' is a 'property' but is used like a 'method'...
0
8199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8212
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.