admin管理员组

文章数量:1627948

System.InvalidOperationException:“A suitable constructor for type ‘Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware’ could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.”

出现这样的错误 一般是取配置文件为null

还有这里:

            app.UseCors(Appsettings.app("Startup", "Cors"));

这里跟配置文件的节点不一致导致出现这样的错误,配置一些 跨域的正确节点就可以解决

本文标签: typeMicrosoftsuitableconstructorInfrastructure