0

How can I log request header fields with IIS. There is the possibility to add custom logging fields, but I want to log the value of HTTP_X_FORWARDED_PROTO, which is not listed in the dropdown list.

Janus
  • 101
  • 1

2 Answers2

0

I have used only IIS 2016 and do not know what is your version. Have to tried to choose X-Forwarded-For Header which is standard header for identifying HTTP and HTTPS. There are a few example here and here

shnoq
  • 1
  • 2
  • I found now a solution, where I can view all server variables. The HTTP_X_FORWARDED_FOR is the same value for all requests, because I'm behind a proxy. – Janus Mar 23 '20 at 15:10
0

I found a different solution. I can debug all server variables of IIS with such a simple site on the webserver. So I don't have to use the log.

<% @ Page Language="C#" %>
<%
foreach (string var in Request.ServerVariables)
{
  Response.Write(var + " " + Request[var] + "<br>");
}
%>
Janus
  • 101
  • 1