【发布时间】:2019-06-26 20:13:21
【问题描述】:
我正在将内容从我的 ASP.Net MVC 应用程序 (.Net Framework 4.7) 转移到新的 .Net Core 2.2 API。
在我的旧 MVC 应用程序中,我通过 HttpResponseBase.AppendToLog() 在 IIS 日志中添加了一些特定的 POST 属性。我在 .Net Core 中找不到类似的方法。
我的问题:如何将 HttpPost 中的属性添加到 .Net Core Api 中的 IIS 日志中?日志如下所示:
2019-06-26 19:34:07 website-ip-address POST /some-endpoint [data-to-log-ended-here] 443 username ip-address etc.
【问题讨论】:
标签: asp.net-mvc iis asp.net-core-webapi iis-logs