Commit a0e64181 authored by 黄奎's avatar 黄奎

新增配置

parent 03d620c2
......@@ -34,13 +34,11 @@ namespace Mall.WebApi.Filter
//记录错误日志
if (context.HttpContext.Items[GlobalKey.UserPostInfo] != null)
{
LogHelper.Write(context.Exception,$"ApiExceptionFilterAttribute_InvokeServiceMethod请求地址:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())},请求参数:{JsonConvert.SerializeObject(context.HttpContext.Items[GlobalKey.UserPostInfo].ToString())}");
Console.WriteLine(context.Exception);
LogHelper.Write(context.Exception,$"ApiExceptionFilterAttribute_InvokeServiceMethod_1:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())},请求参数:{JsonConvert.SerializeObject(context.HttpContext.Items[GlobalKey.UserPostInfo].ToString())}");
}
else
{
LogHelper.Write(context.Exception,$"ApiExceptionFilterAttribute_InvokeServiceMethod请求地址:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())}");
Console.WriteLine(context.Exception);
LogHelper.Write(context.Exception,$"ApiExceptionFilterAttribute_InvokeServiceMethod_2:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())}");
}
var robj = new ApiResult()
......
......@@ -26,6 +26,8 @@ namespace Mall.WebApi
options.AllowSynchronousIO = true;
//设置应用服务器Kestrel请求体最大为50MB
options.Limits.MaxRequestBodySize = 52428800;
//解决并发异常
options.Limits.MinRequestBodyDataRate = null;
});
webBuilder.UseStartup<Startup>().UseIIS();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment