事由: 这两天mentor给我布置了个任务让我用BenchmarkDotNet工具去测试一下同一个API 用同步和异步方法写性能上有什么差别. 顺带提一下: 啊啊啊啊 等我仔细看文档的时候文档 发现它让我用Release的模式去运行benchmark. emmm...其实我之前一直在用Debug模式调试.. 所以各位在运行的时候,The best way is build our benchmark in the Release mode and run it from the command
问题由来:.net core api之前是用 .net core 2.0开发的,测试过都是正常的,近期升级到了3.0,发现api get正常,post提示400,405 Method Not Allowed 查找没有找到原因,就在本地调试,提示错误信息: System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true
1.使用VS 2015 新建了一个Core API项目,然后把他的依赖升级到最新(我机器VS 2015默认的包都是rc版本),然后publish. 2.在publish目录的同级目录下,新建Dockerfile,没有后缀,里面内容如下: FROM microsoft/dotnet:latest WORKDIR /root # Copy the app COPY PublishOutput /root/ # Configure the listening port to #ENV ASPNETCO