473,394 Members | 1,748 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,394 software developers and data experts.

request.servervariables collection

TS
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["SCRIPT_NAME"];

Request.ServerVariables["HTTP_HOST"];

Request.ServerVariables["HTTP_USER_AGENT"];

Request.ServerVariables["AUTH_USER"];

Request.ServerVariables["LOGON_USER"];

Request.ServerVariables["SERVER_NAME"];

Request.ServerVariables["LOCAL_ADDR"];

Request.ServerVariables["REMOTE_ADDR"];
Nov 18 '05 #1
2 1643
Hi TS,

As for those ServerVariables you mentioned, in ASP.NET the Buildin objects
such as
Request or the HttpContext.Current's members have encapsulated some of
those servervariables. For example:

Request.Browser
Request.Path
Request.RawUrl
Request.UserAgent
Request.UserHostAddress
Request.UserHostName
Request.UserLanguages
the HttpContext.Current which contains some member indicate the security
context
HttpContext.Current.User

Also, still many other variables which need to retrieve from the
ServerVariables collection.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #2
Hi TS,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3

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

Similar topics

4
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have...
2
by: W. Loo | last post by:
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...
5
by: Ivan | last post by:
hi, I saw some program using "request("fieldname") " instead of "request.QueryString" to get the value from URL, what's the different ?? thanks
4
by: norton | last post by:
Hi all. I have a question in using Request and Request.Form when the asp page is Request("txtName") i can use "testpage.aspx?txtName=User1" to post the value but when i use...
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...
0
by: Michel Gallant | last post by:
I have used simple asp pages to enumerate value/properties of the Request.ClientCertificate collection like so: For Each strKey in Request.ClientCertificate Response.Write strkey & " = " &...
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: Lance Beasley | last post by:
The Request object has a property "userhostaddress" that returns the requester's host IP address. How could a "userhostport" be accomplished to get the requester's TCP port? -- Lance Beasley...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...

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.