【发布时间】:2019-05-22 13:09:21
【问题描述】:
使用 Audit.Net 是否可以为 httpClient 请求创建审核范围,类似于 MVC.Core 或 WebAPI.Core 中间件?
我已经尝试过类似的方法,但没有多大成功,通常它会使应用程序超时。
AuditScope scope = null;
try {
using(HttpClient client = new HttpClient) {
scope = await AuditScope.CreateAsync("",() => client)
// code to initialise the Httpclient
}
}
finally {
await scope.DisposeAsync();
}
【问题讨论】:
标签: dotnet-httpclient audit.net