2

I want to write access log for my application similar to IIS access log
(e.g IIS log file Path: "C:\inetpub\logs\LogFiles\W3SVC1\u_ex190422.log") using .net core.

For below fields I am able to retrieve information from HttpContext object

  • URI Stem(cs-uri-stem)
  • URI Query(cs-uri-query)
  • Method(cs-method)

But I am not able to retrieve information for "Service Name and Instance Number (s-sitename)"

Similar question is asked here:
Retrieve IIS log parameter value from HTTP-Request/Response object

How can I do it?

Thanks in advance.

RPrashant
  • 217
  • 3
  • 13

0 Answers0