Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 从5.3.2升级到5.6.0时,斜扣断裂_.net_Swagger_Swagger Ui_Swashbuckle - Fatal编程技术网

.net 从5.3.2升级到5.6.0时,斜扣断裂

.net 从5.3.2升级到5.6.0时,斜扣断裂,.net,swagger,swagger-ui,swashbuckle,.net,Swagger,Swagger Ui,Swashbuckle,从Swashback 5.3.2升级到5.6.0后,我现在在转到http://localhost:567/swagger/ui/lib/handlebars-2-0-0-js: <Error> <Message>An error has occurred.</Message> <ExceptionMessage>Mapping not found - lib/handlebars-2-0-0-js</ExceptionMessage&

从Swashback 5.3.2升级到5.6.0后,我现在在转到
http://localhost:567/swagger/ui/lib/handlebars-2-0-0-js

<Error>
  <Message>An error has occurred.</Message>
  <ExceptionMessage>Mapping not found - lib/handlebars-2-0-0-js</ExceptionMessage>
  <ExceptionType>Swashbuckle.SwaggerUi.AssetNotFound</ExceptionType>
  <StackTrace>
    at Swashbuckle.SwaggerUi.EmbeddedAssetProvider.GetAsset(String rootUrl, String path) at Swashbuckle.Application.SwaggerUiHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
  </StackTrace>
</Error>

发生了一个错误。
未找到映射-lib/handlebar-2-0-0-js
Swashback.SwaggerUi.AssetNotFound
位于Swashback.Application.SwaggerUiHandler.SendAsync(HttpRequestMessage请求,CancellationToken CancellationToken)的Swashback.SwaggerUi.EmbeddedAssetProvider.GetAsset(字符串根URL,字符串路径)
绝对没有其他代码发生更改。如果我恢复更改,它将再次工作。有什么想法可以改变这一切吗

以下是我仅有的配置:

.EnableSwagger(c =>
    {
        string rootUrl = ConfigurationManager.AppSettings.Get(Constants.SwaggerRootUrl);
        if (!string.IsNullOrEmpty(rootUrl)) {
            c.RootUrl(req => rootUrl);
        }

        string tosMsg = "...";
        c.SingleApiVersion("v1", "Web API")
            .Description("Warning: This site is for authorized partners only. " + tosMsg);

        c.OAuth2("oauth2")
            .Description("OAuth2 Implicit Grant")
            .Flow("implicit")
            .AuthorizationUrl(ConfigurationManager.AppSettings.Get(Constants.SwaggerOAuthBaseUrl) + "/connect/authorize")
            .Scopes(scopes =>
            {   
                scopes.Add("apiaccess", "Play with all the apis.");
            });

        c.DescribeAllEnumsAsStrings();
        c.OperationFilter<AssignOAuth2SecurityRequirements>();
        c.DocumentFilter<FilterByConsumer>();
        c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
    })
.EnableSwagger(c=>
{
string rootUrl=ConfigurationManager.AppSettings.Get(Constants.SwaggerRootUrl);
如果(!string.IsNullOrEmpty(rootUrl)){
c、 RootUrl(req=>RootUrl);
}
字符串tosMsg=“…”;
c、 单一API版本(“v1”、“Web API”)
.说明(“警告:本网站仅供授权合作伙伴使用。”+TOSMG);
c、 OAuth2(“OAuth2”)
.说明(“OAuth2隐式授权”)
.Flow(“隐式”)
.AuthorizationUrl(ConfigurationManager.AppSettings.Get(Constants.SwaggerOAuthBaseUrl)+“/connect/authorize”)
.Scopes(Scopes=>
{   
添加(“apiaccess”,“使用所有API玩”);
});
c、 descripbeAllenumsasstrings();
c、 操作过滤器();
c、 DocumentFilter();
c、 ResolveConflictingActions(apisdescriptions=>apisdescriptions.First());
})

这很奇怪,不应该直接调用
swagger/ui/lib/handlebars-2-0-0-js
你能分享到你的坏实现的链接吗我们绝对不能发布任何坏的东西,所以我只能在我的本地开发机器上重新编写。大摇大摆的用户界面页面是空白的(导航菜单,全白色页面)。但是看看“查看源代码”,我发现它试图加载的所有东西都有一个错误,而旧版本没有。在旧版本上,您是否看到对该错误的调用:
ui/lib/handlebar-2-0-0-js
?它应该只加载包:
/swagger/ui/swagger-ui-bundle-js
,出于好奇,为什么要更新到5.6.0。。。这是2017年7月的老话题:也许你应该看看《大摇大摆网》,我开始时是作为一个虚张声势的分支,但最终将其分离并转换为自己的项目:奇怪的是,不应该直接调用
swagger/ui/lib/handlebars-2-0-0-js
你能分享一个到你失败的实现的链接吗我们绝对不能发布任何失败的东西,所以我只能在我本地的开发机器上重新编写它。大摇大摆的用户界面页面是空白的(导航菜单,全白色页面)。但是看看“查看源代码”,我发现它试图加载的所有东西都有一个错误,而旧版本没有。在旧版本上,您是否看到对该错误的调用:
ui/lib/handlebar-2-0-0-js
?它应该只加载包:
/swagger/ui/swagger-ui-bundle-js
,出于好奇,为什么要更新到5.6.0。。。这是一个非常古老的2017年7月:也许你应该看看《大摇大摆的网络》(swagger net),我开始是作为一个虚张声势的分支,但最终将其分离并过渡到自己的项目: