Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove help pages from an ASP.NET Web API

Tags:

When you create a new Web API Project (MVC 4) it automatically creates the Help Pages for the API. Any ideas how can I remove the ASP.NET Web API help pages?

like image 739
user2818430 Avatar asked Oct 28 '13 18:10

user2818430


People also ask

How do I delete a call from Web API?

Now, you can send HTTP DELETE request using Fiddler as shown below and view the response. As you can see in the above figure, HTTP DELETE request url http://localhost:64189/api/student?id=1 includes query string id. This id query string will be passed as an id parameter in Delete() method.

What is one step you must take to enable XML comments to appear in the default Web API help page in a new WebApi 2 application?

The XmlDocumentationProvider is looking for the xml file(having your xml code comments) which gets generated when you compile your project. You can enable generating this by going to your project Properties -> Build -> Output. Here select the checkbox for XML Documentation file. Save this answer.


2 Answers

  1. Delete the folder called HelpPage under Areas
  2. Remove the package called Microsoft.AspNet.WebApi.HelpPage from your pacakges.config file.
  3. Remove the following line from Views\Shared\_Layout.cshtml file
    @Html.ActionLink("API", "Index", "Help", new { area = "" }, null)
like image 115
Kiran Avatar answered Dec 05 '22 20:12

Kiran


As a more recommended solution to Kiran's solution is to go simply to Nuget Package Manager and remove the package Microsoft.AspNet.WebApi.HelpPage.

This is going to remove all the necessary files including those in the areas folder.

like image 45
Jakub Holovsky Avatar answered Dec 05 '22 20:12

Jakub Holovsky