The following table lists several properties of the Request object and displays values associated with your current real-time URL request for this page.
Request.UserAgent
The full identification of the browser requesting the page:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Request.Browser.Browser
The type of browser making the request:
IE
Request.Browser.Type
The type and major version of the browser making the request:
IE7
Request.Browser.Version
The major and minor versions of the browser request:
7
Request.Browser.MajorVersion
The major version of the browser making the request:
7
Request.Browser.MinorVersion
The minor version of the browser making the request:
0
Request.Browser.AOL
Whether this is an AOL browser:
FALSE
Request.Browser.Frames
Whether the browser supports frames:
TRUE
Request.Browser.JavaScript
Whether the browser supports JavaScript:
TRUE
Request.Browser.Platform
The type of operating system under which the browser is running:
WinXP
Request.IsSecureConnection
Whether the current connection uses a secure Web protocol:
FALSE
Request.UserHostAddress
The IP address from which the browser is requesting the page:
61.8.133.5
Server Properties->
Request.ServerVariables("LOCAL_ADDR")
The IP address of the server hosting the requested page.
168.16.190.175
Request.Url.Host
The URL of the server hosting the requested page:
msconline.maconstate.edu
Request.RawUrl
The portion of the URL request following the domain information:
/tutorials/ASPNET2/ASPNET03/aspnet03-07.aspx
Request.Url.Scheme
The type of URL request:
http
Request.Url.Port
The port through which the URL request is made:
80
Request.ApplicationPath
The virtual path to the root directory containing the page requested by the browser:
/Tutorials
Request.FilePath
The virtual path to the page requested by the browser:
/tutorials/ASPNET2/ASPNET03/aspnet03-07.aspx
Request.PhysicalApplicationPath
The physical path to the root directory of the page requested by the browser:
c:\Tutorials\
Request.PhysicalPath
The physical path to the page requested by the browser:
c:\Tutorials\ASPNET2\ASPNET03\aspnet03-07.aspx
I am running this Blog to help other guys, who are looking some bits and pieces in terms of MS technology....
Tuesday, March 25, 2008
How to get all HTTP Headers in ASP.NET
Drag and drop a literal onto your aspx web form in design view. The HTML will have this in it:
< id="Literal1" runat="server">
Now, in the code behind, add the following to the page load event:
'Put user code to initialize the page here
' Create a string variable to hold our server variables
Dim header As String
' Hold the values in a variable
Dim holder As String
' Iterate through the servervariables collection and put the headers and values in a variable
For Each header In Request.ServerVariables
' Store in our variable...
holder &= (header.ToString & " = " & Request.ServerVariables(header).ToString & " <> <>" & vbCrLf)
Next
' Put our variable into our literal to display on our page
Literal1.Text = holder
Run the page, and you'll get all the headers and values will be displayed.
< id="Literal1" runat="server">
Now, in the code behind, add the following to the page load event:
'Put user code to initialize the page here
' Create a string variable to hold our server variables
Dim header As String
' Hold the values in a variable
Dim holder As String
' Iterate through the servervariables collection and put the headers and values in a variable
For Each header In Request.ServerVariables
' Store in our variable...
holder &= (header.ToString & " = " & Request.ServerVariables(header).ToString & " <> <>" & vbCrLf)
Next
' Put our variable into our literal to display on our page
Literal1.Text = holder
Run the page, and you'll get all the headers and values will be displayed.
Subscribe to:
Posts (Atom)
Split the String values with a special character in MS Flow to convert this into Array
Many times we have a requirement to prepare the Mailing address for some of the documents, suppose there are Address Line1, Address Line2, ...
-
Use the following line of code to Reopen the closed task in CRM 2011 // Re-open the Task to update it SetStateRequest ssr = new SetStat...
-
Use the following line of code to create complete workflow activity with two output parameters. 1) Open Visual Studio 2010 ID. 2) Open ...
-
Sometimes you experienced when you have subgrid in your CRM Form, but when you click the ‘expand’ button to expand the view then it will re...