ABP分拆業務應用筆記
阿新 • • 發佈:2020-07-27
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");