ABP分拆业务应用笔记

1·、分拆过程中遇到一个错误 ,搜了半天没找到报错组件,查看日志发现在swagger输出页面的时候报错,进一步检查startup里面的代码,发现输出路径不对,修改路径后解决

2020-06-16 10:52:27,770 || ERROR || Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware  || An unhandled exception has occurred while executing the request. || System.ArgumentNullException: Value cannot be null.
Parameter name: stream
   at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.RespondWithIndexHtml(HttpResponse response)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
 ||end 
//修改本名代码中的输出路径                
options.IndexStream = () => Assembly.GetExecutingAssembly().GetManifestResourceStream("Design.AllInOne.Core.Web.wwwroot.swagger.ui.index.html");

 

posted @ 2020-07-27 14:09  CqMagic  阅读(208)  评论(0编辑  收藏  举报