似乎是绘图库的问题,可参考以下方法看看:https://blog.csdn.net/u014374975/article/details/115436174
fail: DTcms.Core.API.Filters.GlobalExceptionFilter[0]
异常信息:The type initializer for 'Gdip' threw an exception. | at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, IntPtr scan0, IntPtr& bitmap)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at DTcms.Core.Common.Helper.VerifyCodeHelper.Create(String captchaCode, Int32 width, Int32 height) in /Users/macos/Downloads/DTcms_core_src/DTcms.Core.Common/Helper/VerifyCodeHelper.cs:line 26
at DTcms.Core.API.Controllers.VerifyCodeController.GetCode() in /Users/macos/Downloads/DTcms_core_src/DTcms.Core.API/Controllers/Application/VerifyCodeController.cs:line 46
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()