| Question: | Is there a resource that maps the properties from the ServerVariables collection to properties in a |
| Answer: |
Some, although not all, of the Server Variables are collected by System.Web.HttpRequest as individual properties.
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.
|
| Link to more information: | http://beta.asp.net/QUICKSTART/util/classbrowser.aspx?assembly=System.Web,%20Version=2.0.0.0,%20Culture=neutral,%20PublicKeyToken=b03f5f7f11d50a3a&namespace=System.Web&class=HttpRequest |