public async Task<IActionResult> Test() { Diego.DotNetEx.LogHelper.Instance.WriteLog("开始进入测试...."); var test = await HttpClintPreheat.HttpClintProvider.GetAsync("http://www.baofeng.com/"); Diego.DotNetEx.LogHelper.Instance.WriteLog("发起异步请求...."); var bytes = test.Content.ReadAsByteArrayAsync(); Diego.DotNetEx.LogHelper.Instance.WriteLog("数据库保存成功...."); return new EmptyResult(); }
IIS中得日志如下:
2017-09-13 11:21:36:010 [Notice]开始进入测试.... 2017-09-13 11:21:40:690 [Notice]发起异步请求.... 2017-09-13 11:21:40:690 [Notice]数据库保存成功....
Kestrel如下:
2017-09-13 11:21:31:517 [Notice]开始进入测试.... 2017-09-13 11:21:32:305 [Notice]发起异步请求.... 2017-09-13 11:21:32:305 [Notice]数据库保存成功....
ASP.NET Core2.0 请问下这是什么情况?
代理禁用掉:
HttpClientHandler handler = new HttpClientHandler();
handler.UseProxy = false;
可以试试,但是还是想不通Kestrel和IIS结果为什么这么大
都啥年代了 还用啥IIS 嘛
.net core 都用上了 还抱着IIS不放手做什么。。。。
客户机上有IIS并且占用了80端口