Have a look at the Headers property in the Request object.
C#
string headers = Request.Headers.ToString();
Or, if you want it formatted in some other way:
string headers = String.Empty;
foreach (var key in Request.Headers.AllKeys)
headers += key + "=" + Request.Headers[key] + Environment.NewLine;
VB.NET:
Dim headers = Request.Headers.ToString()
Or:
Dim headers As String = String.Empty
For Each key In Request.Headers.AllKeys
headers &= key & "=" & Request.Headers(key) & Environment.NewLine
Next
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…