Answered by:
ASP.NET Web API Help Page Not Working

Question
-
User-1582807108 posted
Hello All,
I am using Visual Studio 2013 Express for Web, trying to create
a simple ASP.Net Web API and cannot seem to make its Helper
functionality work ... wondering what I am doing wrong ...
The steps I have taken so far as as follows:
Step 1. Create New Project
Step 2. Select Empty template, Web API, without any unit test
Step 3. Select Tools > NuGet Package Manager > Package Manager Console
Step 4. Run the command below from the Package Manager Console
PM> install-package microsoft.aspnet.webapi.helppage
Step 5. Hit the F5 button to run the web api application
Step 6. Go to the URL address bar and append "/help" to the address
that shows up from Step 5 such that it reads something like:
http://localhost:59672/help
Step 7. Hit enter key from the modified URL address textbox
Step 8. From Step 7, the browser responds with an error that says thus:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name
changed, or is temporarily unavailable.
I am a bit new to ASP.NET Web API and so am quite confused because from what I know
http://localhost:59672/help should be giving me a help page with hyperlinks that would
give me details related to the methods in the API, how to call them ... the kind of results I expect
etc....
Thanks so much for all the help you could give, I really appreciate it.
Gratefully,
Ric
-------------- Everything below this line are only information which shows what I am seeing ----------------------------
The response I get from the Package Manager Console is shown below:
PM> install-package microsoft.aspnet.webapi.helppage
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 5.2.3 && < 5.3.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 5.2.3 && < 5.3.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 5.2.3)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.4)'.
Attempting to resolve dependency 'Microsoft.AspNet.Mvc (≥ 5.2.3 && < 5.3.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebPages (≥ 3.2.3 && < 3.3.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 3.2.3 && < 3.3.0)'.
Installing 'Microsoft.AspNet.WebApi.Client 5.2.3'.
You are downloading Microsoft.AspNet.WebApi.Client from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the
package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If
you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.2.3'.
Installing 'Microsoft.AspNet.WebApi.Core 5.2.3'.
You are downloading Microsoft.AspNet.WebApi.Core from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the
package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If
you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.Core 5.2.3'.
Installing 'Microsoft.AspNet.WebApi.WebHost 5.2.3'.
You are downloading Microsoft.AspNet.WebApi.WebHost from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the
package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If
you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.WebHost 5.2.3'.
Installing 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'.
Installing 'Microsoft.AspNet.Razor 3.2.3'.
You are downloading Microsoft.AspNet.Razor from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the package
for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not
accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.Razor 3.2.3'.
Installing 'Microsoft.AspNet.WebPages 3.2.3'.
You are downloading Microsoft.AspNet.WebPages from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the package
for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not
accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebPages 3.2.3'.
Installing 'Microsoft.AspNet.Mvc 5.2.3'.
You are downloading Microsoft.AspNet.Mvc from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the package for
additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not
accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.Mvc 5.2.3'.
Installing 'Microsoft.AspNet.WebApi.HelpPage 5.2.3'.
You are downloading Microsoft.AspNet.WebApi.HelpPage from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the
package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If
you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.HelpPage 5.2.3'.
Removing 'Microsoft.AspNet.WebApi.WebHost 5.2.2' from TestHelperNow.
Successfully removed 'Microsoft.AspNet.WebApi.WebHost 5.2.2' from TestHelperNow.
Removing 'Microsoft.AspNet.WebApi.Core 5.2.2' from TestHelperNow.
Successfully removed 'Microsoft.AspNet.WebApi.Core 5.2.2' from TestHelperNow.
Removing 'Microsoft.AspNet.WebApi.Client 5.2.2' from TestHelperNow.
Successfully removed 'Microsoft.AspNet.WebApi.Client 5.2.2' from TestHelperNow.
Adding 'Microsoft.AspNet.WebApi.Client 5.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.WebApi.Client 5.2.3' to TestHelperNow.
Adding 'Microsoft.AspNet.WebApi.Core 5.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.WebApi.Core 5.2.3' to TestHelperNow.
Adding 'Microsoft.AspNet.WebApi.WebHost 5.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.WebApi.WebHost 5.2.3' to TestHelperNow.
Adding 'Microsoft.Web.Infrastructure 1.0.0.0' to TestHelperNow.
Successfully added 'Microsoft.Web.Infrastructure 1.0.0.0' to TestHelperNow.
Adding 'Microsoft.AspNet.Razor 3.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.Razor 3.2.3' to TestHelperNow.
Adding 'Microsoft.AspNet.WebPages 3.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.WebPages 3.2.3' to TestHelperNow.
Adding 'Microsoft.AspNet.Mvc 5.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.Mvc 5.2.3' to TestHelperNow.
Adding 'Microsoft.AspNet.WebApi.HelpPage 5.2.3' to TestHelperNow.
Successfully added 'Microsoft.AspNet.WebApi.HelpPage 5.2.3' to TestHelperNow.
Uninstalling 'Microsoft.AspNet.WebApi.WebHost 5.2.2'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.WebHost 5.2.2'.
Uninstalling 'Microsoft.AspNet.WebApi.Core 5.2.2'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.Core 5.2.2'.
Uninstalling 'Microsoft.AspNet.WebApi.Client 5.2.2'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.Client 5.2.2'.
------------- Additional Supporting Information : result of dir command from DOS Console for contents of newly created Areas folder and its sub folders ------------------
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM <DIR> HelpPage
0 File(s) 0 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 1,541 ApiDescriptionExtensions.cs
2015-05-26 12:20 AM <DIR> App_Start
2015-05-26 12:20 AM <DIR> Controllers
2015-05-26 12:20 AM 2,445 HelpPage.css
2015-05-26 12:20 AM 696 HelpPageAreaRegistration.cs
2015-05-26 12:20 AM 24,552 HelpPageConfigurationExtensions.cs
2015-05-26 12:20 AM <DIR> ModelDescriptions
2015-05-26 12:20 AM <DIR> Models
2015-05-26 12:20 AM <DIR> SampleGeneration
2015-05-26 12:20 AM <DIR> Views
2015-05-26 12:20 AM 7,191 XmlDocumentationProvider.cs
5 File(s) 36,425 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\App_Start
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 6,609 HelpPageConfig.cs
1 File(s) 6,609 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\Controllers
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 1,960 HelpController.cs
1 File(s) 1,960 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\ModelDescriptions
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 206 CollectionModelDescription.cs
2015-05-26 12:20 AM 400 ComplexTypeModelDescription.cs
2015-05-26 12:20 AM 152 DictionaryModelDescription.cs
2015-05-26 12:20 AM 421 EnumTypeModelDescription.cs
2015-05-26 12:20 AM 255 EnumValueDescription.cs
2015-05-26 12:20 AM 269 IModelDocumentationProvider.cs
2015-05-26 12:20 AM 280 KeyValuePairModelDescription.cs
2015-05-26 12:20 AM 351 ModelDescription.cs
2015-05-26 12:20 AM 19,536 ModelDescriptionGenerator.cs
2015-05-26 12:20 AM 581 ModelNameAttribute.cs
2015-05-26 12:20 AM 1,477 ModelNameHelper.cs
2015-05-26 12:20 AM 244 ParameterAnnotation.cs
2015-05-26 12:20 AM 564 ParameterDescription.cs
2015-05-26 12:20 AM 140 SimpleTypeModelDescription.cs
14 File(s) 24,876 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\Models
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 4,063 HelpPageApiModel.cs
1 File(s) 4,063 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\SampleGeneration
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 21,406 HelpPageSampleGenerator.cs
2015-05-26 12:20 AM 6,649 HelpPageSampleKey.cs
2015-05-26 12:20 AM 1,096 ImageSample.cs
2015-05-26 12:20 AM 1,011 InvalidSample.cs
2015-05-26 12:20 AM 19,950 ObjectGenerator.cs
2015-05-26 12:20 AM 240 SampleDirection.cs
2015-05-26 12:20 AM 925 TextSample.cs
7 File(s) 51,277 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\Views
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM <DIR> Help
2015-05-26 12:20 AM <DIR> Shared
2015-05-26 12:20 AM 1,853 Web.config
2015-05-26 12:20 AM 178 _ViewStart.cshtml
2 File(s) 2,031 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\Views\Help
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 667 Api.cshtml
2015-05-26 12:20 AM <DIR> DisplayTemplates
2015-05-26 12:20 AM 1,175 Index.cshtml
2015-05-26 12:20 AM 603 ResourceModel.cshtml
3 File(s) 2,445 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\Views\Help\DisplayTemplates
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 1,234 ApiGroup.cshtml
2015-05-26 12:20 AM 206 CollectionModelDescription.cshtml
2015-05-26 12:20 AM 140 ComplexTypeModelDescription.cshtml
2015-05-26 12:20 AM 400 DictionaryModelDescription.cshtml
2015-05-26 12:20 AM 699 EnumTypeModelDescription.cshtml
2015-05-26 12:20 AM 1,807 HelpPageApiModel.cshtml
2015-05-26 12:20 AM 83 ImageSample.cshtml
2015-05-26 12:20 AM 250 InvalidSample.cshtml
2015-05-26 12:20 AM 396 KeyValuePairModelDescription.cshtml
2015-05-26 12:20 AM 963 ModelDescriptionLink.cshtml
2015-05-26 12:20 AM 1,693 Parameters.cshtml
2015-05-26 12:20 AM 928 Samples.cshtml
2015-05-26 12:20 AM 110 SimpleTypeModelDescription.cshtml
2015-05-26 12:20 AM 100 TextSample.cshtml
14 File(s) 9,009 bytes
Directory of O:\TestWebAPIhelper\TestHelperNow\TestHelperNow\Areas\HelpPage\Views\Shared
2015-05-26 12:20 AM <DIR> .
2015-05-26 12:20 AM <DIR> ..
2015-05-26 12:20 AM 267 _Layout.cshtml
1 File(s) 267 bytes
Total Files Listed:
49 File(s) 138,962 bytes
Tuesday, May 26, 2015 3:06 AM
Answers
-
User1644755831 posted
Hello ric1ca,
ric1ca
HTTP Error 404.0 - Not FoundThis means you can not find the proper route to the method. Please check your routing in route config class.
Please follow this tutorial. Creating Help Pages for ASP.NET Web API
see Adding Help Pages to an Existing Project section.
With Regards,
Krunal Parekh
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, May 27, 2015 12:47 AM
All replies
-
User1644755831 posted
Hello ric1ca,
ric1ca
HTTP Error 404.0 - Not FoundThis means you can not find the proper route to the method. Please check your routing in route config class.
Please follow this tutorial. Creating Help Pages for ASP.NET Web API
see Adding Help Pages to an Existing Project section.
With Regards,
Krunal Parekh
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, May 27, 2015 12:47 AM -
User-1582807108 posted
Thank for helping me ... I read through the link you gave and it solved the problem hence at this point please consider the problem solved
The key info information in the link you so kindly shared was when it said: add the AreaRegistration.RegisterAllAreas ... it looks like if one is building an ASP.Net Web API using empty template the said line is not added by default in the global.asax file ... thanks againWednesday, May 27, 2015 9:53 AM