-
本站
2022-03-04 16:13:14
863 °
我的目的很简单,就是在Filter中读取数据记录请求日志。先看.NET CORE 3.1的代码var requestData = context.HttpContext.Request.Body;
requestData.Position = 0;
string raw…
-
网络
2022-03-04 09:48:49
1000 °
API代码 [HttpPost]
public ApiResult UpFile(List files)
{
if (files.Count != 1) throw new MyE…
-
本站
2022-02-15 11:40:18
864 °
官方文档:https://docs.microsoft.com/zh-CN/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-error-500-19-webpage
-
本站
2021-12-23 18:32:27
1010 °
今天用了一天,不断学习吧,改变还是挺大的。首先说EFCORE,enable-migrations 命令居然没了。会提示Enable-Migrations is obsolete. Use Add-Migration to start using Migrations.好…
-
本站
2021-05-28 11:14:05
1036 °
1、首先引包 Microsoft.Extensiions.Hosting.WindowsServices2、修改program.cs文件public class Program { public static void Main(string[] a…
-
本站
2021-03-22 11:34:33
1095 °
实现的方法非常简单: web.config中配置一个参数:<httpRuntime enableVersionHeader=”false”/>
-
本站
2021-03-22 11:32:14
1066 °
在GLOBAL中加入下图代码即可MvcHandler.DisableMvcResponseHeader = true;
-
本站
2020-11-24 15:45:25
1157 °
刚有个API程序发布,坑了我2个小时。。。在本地测试没有问题,放到服务器后,报500.30定位到目录执行 dotnet xxx.exe报 An assembly specified in the application dependencies manife…
-
本站
2020-07-27 10:10:53
1165 °
很简单在action或controller上加标记[ApiExplorerSettings(IgnoreApi =true)]
-
本站
2020-07-08 09:02:27
1122 °
地址:https://docs.microsoft.com/zh-cn/dotnet/<官方文档不用多解释,快快get
-
本站
2020-07-06 17:12:34
1124 °
开发中我们以常会用到多线程进行操作。在.net core中 Task里用到上下文时经常会遇到错误Cannot access a disposed object. A common cause of this error is disposing a context th…
-
本站
2020-07-02 17:02:18
1105 °
var p3= Path.Combine(p1, p2);说明:第一种情况:p2以”/“或”\“开头,p3=p2第二种情况:p2不以”/“或”\“开头且不是绝对路径,p3=p1+p2第三种情况:p2是绝对路径,p3=p2