Hi, Clinton.
Some, although not all, of the Server Variables are collected
by System.Web.HttpRequest as individual properties.
See :
http://beta.asp.net/QUICKSTART/util/...ss=HttpRequest
So, Request.ServerVariables("URL") is provided by System.Web.HttpRequest.Url
and Request.ServerVariables("APPLICATION_PHYSICAL_PATH ") is
provided by Request.PhysicalApplicationPath.
Interestingly, the whole ServerVariables Collection is also provided
by System.Web.HttpRequest as a separate NameValueCollection,
so all the Request.ServerVariables are available, although at the
performance cost mentioned.
The HttpRequest class adds a few properties not found in Request.ServerVariables, too.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Juan, is there any resource that maps the properties from the ServerVariables collection
to properties in a class that may be provided by the framework?
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl... Request.ServerVariables("Auth_User").Split("\")(1) )
uses a language feature to parse a server variable.
User.Identity.Name uses a native .Net property
Using a native .net class is usually more efficient
than using a Server Collection like ServerVariables.
When you load ServerVariables you load the whole collection.
That's quite a lot of data.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"ari" <ar*@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com... hey all,
i was wondering what the difference is between obtaining a user name like
Request.ServerVariables("Auth_User").Split("\")(1) )
and
User.Identity.Name
Is one newer than the other or something like that?
thanks,
ari