昂首阔步没有显示任何数据

时间:2017-05-04 18:45:07

标签: asp.net-web-api2 owin swagger-ui swashbuckle bearer-token

我目前正在使用以下版本的招摇

  <package id="Swashbuckle.Core" version="5.5.3" targetFramework="net45" />

如果我从邮递员那里听到招摇的api,我会得到数据

postman screenshot

但如果我从浏览器打开它,浏览器就会无法响应

microsoft edge screenshot

我可以做些什么让swagger-ui工作?

我尝试在faq中提供owin解决方案,也试过禁用验证器但没有工作。以下是我的招摇配置:

        config.EnableSwagger(c =>
        {
            c.SingleApiVersion("v1", "ColloSys.Webapi");
            c.ResolveConflictingActions(x => x.First());
            c.RootUrl(req =>
                req.RequestUri.GetLeftPart(UriPartial.Authority) +
                req.GetRequestContext().VirtualPathRoot.TrimEnd('/'));
        }).EnableSwaggerUi(x =>
        {
            x.DisableValidator();
        });

仅供参考:我在OWIN上使用它,而我的web-api有承载令牌认证实现(如果这很重要)

**编辑**

如果我在firefox中打开它,它会给我一些关于无响应脚本的错误

firefox

0 个答案:

没有答案
相关问题