ASP.Net的Web API帮助页面返回空输出 [英] ASP.Net Web API Help Page returning empty output

查看:244
本文介绍了ASP.Net的Web API帮助页面返回空输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个preexisting,我使用的NuGet添加的Web API和Web API文档自MVC应用程序。而Web API控制器的功能精(返回HTTP请求有效回答)帮助控制器没有找到任何Web API方法来记录。

I have a preexisting MVC app that I added Web API and Web API Self Documentation using Nuget. While the Web API controllers function fine (return valid responses to HTTP requests) the Help controller is not finding any Web API methods to document.

在帮助控制指标行动Configuration.Services.GetApiExplorer()。ApiDescriptions与0的结果返回。

In the Help controller Index action "Configuration.Services.GetApiExplorer().ApiDescriptions" is returning with 0 results.

我甚至竟然从另一运行Web应用程序复制整个HelpPage区域。

I even went as far as copying the entire "HelpPage" area from another functioning web app.

什么填充ApiDescriptions以及是否有我需要设置以公开我的API资料如有的配置设置?

What populated ApiDescriptions and are there any config settings I need to set to expose my api to documentations?

东西我曾尝试:


  • 重新安装的NuGet包

  • 复制过HelpPage面积由工作项目

  • 复制过的路线从工作项目

  • 从工作项目比较引用破碎项目

  • 的Global.asax.cs从工作项目比较破碎项目

  • 的web.config的工作,从项目比较破碎项目

推荐答案

原来我瞥见MVC 4安装被干扰。这是一个已知的问题与掠影和Web API帮助页面。卸载掠影解决问题。

It turns out my Glimpse MVC 4 installation was interfering. This is a known issue with Glimpse and Web API Help Pages. Uninstalling Glimpse fixes the problem.

这篇关于ASP.Net的Web API帮助页面返回空输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆