Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » Howto » Downloads
 
Add your own
alternative version

ASP.NET WebAPI Hosting Techniques

, 11 Sep 2013
We shall see different WebAPI hosting techniques by creating a WebAPI library and referencing it in different hosting projects. Also perform unit tests to confirm the functionality of our WebAPI logic.
WebAPI-BasicSample-noexe.zip
WebAPI-BasicSample
ConsoleHosting
Properties
MvcProductsSample
App_Start
Content
themes
base
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
minified
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Controllers
favicon.ico
Global.asax
Images
accent.png
bullet.png
heroAccent.png
orderedList0.png
orderedList1.png
orderedList2.png
orderedList3.png
orderedList4.png
orderedList5.png
orderedList6.png
orderedList7.png
orderedList8.png
orderedList9.png
MvcProductsSample.csproj.user
Properties
Scripts
Views
Home
Shared
packages
DotNetOpenAuth.4.2.2.13055
DotNetOpenAuth.4.2.2.13055.nupkg
DotNetOpenAuth.AspNet.4.0.3.12153
DotNetOpenAuth.AspNet.4.0.3.12153.nupkg
lib
net40-full
DotNetOpenAuth.Core.4.0.3.12153
DotNetOpenAuth.Core.4.0.3.12153.nupkg
lib
net40-full
DotNetOpenAuth.Core.4.2.2.13055
content
web.config.transform
DotNetOpenAuth.Core.4.2.2.13055.nupkg
lib
net35-full
net40-full
net45-full
DotNetOpenAuth.Core.UI.4.2.2.13055
DotNetOpenAuth.Core.UI.4.2.2.13055.nupkg
lib
net35-full
net40-full
net45-full
DotNetOpenAuth.InfoCard.4.2.2.13055
DotNetOpenAuth.InfoCard.4.2.2.13055.nupkg
lib
net35-full
net40-full
net45-full
DotNetOpenAuth.InfoCard.UI.4.2.2.13055
DotNetOpenAuth.InfoCard.UI.4.2.2.13055.nupkg
lib
net35-full
net40-full
net45-full
jQuery.1.7.1.1
Content
Scripts
jQuery.1.7.1.1.nupkg
Tools
common.ps1
install.ps1
uninstall.ps1
jQuery.UI.Combined.1.8.20.1
Content
Content
themes
base
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
minified
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Scripts
jQuery.UI.Combined.1.8.20.1.nupkg
jQuery.Validation.1.9.0.1
Content
Scripts
jQuery.Validation.1.9.0.1.nupkg
knockoutjs.2.1.0
Content
Scripts
knockoutjs.2.1.0.nupkg
Microsoft.AspNet.Mvc.4.0.20710.0
lib
net40
Microsoft.AspNet.Mvc.4.0.20710.0.nupkg
Microsoft.AspNet.Razor.2.0.20710.0
lib
net40
Microsoft.AspNet.Razor.2.0.20710.0.nupkg
Microsoft.AspNet.Web.Optimization.1.0.0
Microsoft.AspNet.Web.Optimization.1.0.0.nupkg
Microsoft.AspNet.WebApi.4.0.20710.0
Microsoft.AspNet.WebApi.4.0.20710.0.nupkg
Microsoft.AspNet.WebApi.Client.4.0.20710.0
lib
net40
Microsoft.AspNet.WebApi.Client.4.0.20710.0.nupkg
Microsoft.AspNet.WebApi.Core.4.0.20710.0
content
web.config.transform
lib
net40
Microsoft.AspNet.WebApi.Core.4.0.20710.0.nupkg
Microsoft.AspNet.WebApi.SelfHost.4.0.20918.0
lib
net40
Microsoft.AspNet.WebApi.SelfHost.4.0.20918.0.nupkg
Microsoft.AspNet.WebApi.WebHost.4.0.20710.0
lib
net40
Microsoft.AspNet.WebApi.WebHost.4.0.20710.0.nupkg
Microsoft.AspNet.WebPages.2.0.20710.0
lib
net40
Microsoft.AspNet.WebPages.2.0.20710.0.nupkg
Microsoft.AspNet.WebPages.Data.2.0.20710.0
lib
net40
Microsoft.AspNet.WebPages.Data.2.0.20710.0.nupkg
Microsoft.AspNet.WebPages.OAuth.2.0.20710.0
lib
net40
Microsoft.AspNet.WebPages.OAuth.2.0.20710.0.nupkg
Microsoft.AspNet.WebPages.WebData.2.0.20710.0
lib
net40
Microsoft.AspNet.WebPages.WebData.2.0.20710.0.nupkg
Microsoft.jQuery.Unobtrusive.Ajax.2.0.20710.0
Content
Scripts
Microsoft.jQuery.Unobtrusive.Ajax.2.0.20710.0.nupkg
Microsoft.jQuery.Unobtrusive.Validation.2.0.20710.0
Content
Scripts
Microsoft.jQuery.Unobtrusive.Validation.2.0.20710.0.nupkg
Microsoft.Net.Http.2.0.20710.0
lib
net40
net45
_._
Microsoft.Net.Http.2.0.20710.0.nupkg
Microsoft.Web.Infrastructure.1.0.0.0
Microsoft.Web.Infrastructure.1.0.0.0.nupkg
Modernizr.2.5.3
Content
Scripts
Modernizr.2.5.3.nupkg
Newtonsoft.Json.4.5.11
lib
net20
net35
net40
portable-net40+sl4+wp7+win8
sl3-wp
sl4
sl4-windowsphone71
winrt45
Newtonsoft.Json.4.5.11.nupkg
Newtonsoft.Json.4.5.6
lib
net40
Newtonsoft.Json.4.5.6.nupkg
NUnit.2.6.2
lib
NUnit.2.6.2.nupkg
ProductsLibrary
Properties
ProductsUnitTest
Properties
WebAPI-BasicSample.v11.suo
WebAPI-BasicSample
Properties
WebAPI-BasicSample.zip
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
favicon.ico
Global.asax
accent.png
bullet.png
heroAccent.png
orderedList0.png
orderedList1.png
orderedList2.png
orderedList3.png
orderedList4.png
orderedList5.png
orderedList6.png
orderedList7.png
orderedList8.png
orderedList9.png
MvcProductsSample.csproj.user
DotNetOpenAuth.4.2.2.13055.nupkg
DotNetOpenAuth.AspNet.4.0.3.12153.nupkg
DotNetOpenAuth.AspNet.dll
DotNetOpenAuth.Core.4.0.3.12153.nupkg
DotNetOpenAuth.Core.dll
web.config.transform
DotNetOpenAuth.Core.4.2.2.13055.nupkg
DotNetOpenAuth.Core.dll
DotNetOpenAuth.Core.dll
DotNetOpenAuth.Core.dll
DotNetOpenAuth.Core.UI.4.2.2.13055.nupkg
DotNetOpenAuth.Core.UI.dll
DotNetOpenAuth.Core.UI.dll
DotNetOpenAuth.Core.UI.dll
DotNetOpenAuth.InfoCard.4.2.2.13055.nupkg
DotNetOpenAuth.InfoCard.dll
DotNetOpenAuth.InfoCard.dll
DotNetOpenAuth.InfoCard.dll
DotNetOpenAuth.InfoCard.UI.4.2.2.13055.nupkg
DotNetOpenAuth.InfoCard.UI.dll
DotNetOpenAuth.InfoCard.UI.dll
DotNetOpenAuth.InfoCard.UI.dll
jQuery.1.7.1.1.nupkg
common.ps1
install.ps1
uninstall.ps1
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
jQuery.UI.Combined.1.8.20.1.nupkg
jQuery.Validation.1.9.0.1.nupkg
knockoutjs.2.1.0.nupkg
System.Web.Mvc.dll
Microsoft.AspNet.Mvc.4.0.20710.0.nupkg
System.Web.Razor.dll
Microsoft.AspNet.Razor.2.0.20710.0.nupkg
lib
net40
System.Web.Optimization.dll
Microsoft.AspNet.Web.Optimization.1.0.0.nupkg
Microsoft.AspNet.WebApi.4.0.20710.0.nupkg
System.Net.Http.Formatting.dll
Microsoft.AspNet.WebApi.Client.4.0.20710.0.nupkg
web.config.transform
System.Web.Http.dll
Microsoft.AspNet.WebApi.Core.4.0.20710.0.nupkg
System.Web.Http.SelfHost.dll
Microsoft.AspNet.WebApi.SelfHost.4.0.20918.0.nupkg
System.Web.Http.WebHost.dll
Microsoft.AspNet.WebApi.WebHost.4.0.20710.0.nupkg
System.Web.Helpers.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll
Microsoft.AspNet.WebPages.2.0.20710.0.nupkg
WebMatrix.Data.dll
Microsoft.AspNet.WebPages.Data.2.0.20710.0.nupkg
Microsoft.Web.WebPages.OAuth.dll
Microsoft.AspNet.WebPages.OAuth.2.0.20710.0.nupkg
WebMatrix.WebData.dll
Microsoft.AspNet.WebPages.WebData.2.0.20710.0.nupkg
Microsoft.jQuery.Unobtrusive.Ajax.2.0.20710.0.nupkg
Microsoft.jQuery.Unobtrusive.Validation.2.0.20710.0.nupkg
System.Net.Http.dll
System.Net.Http.WebRequest.dll
_._
Microsoft.Net.Http.2.0.20710.0.nupkg
lib
net40
Microsoft.Web.Infrastructure.dll
Microsoft.Web.Infrastructure.1.0.0.0.nupkg
Modernizr.2.5.3.nupkg
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.dll
Newtonsoft.Json.4.5.11.nupkg
Newtonsoft.Json.dll
Newtonsoft.Json.4.5.6.nupkg
nunit.framework.dll
NUnit.2.6.2.nupkg
WebAPI-BasicSample.v11.suo

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Ranjan.D
Web Developer
United States United States
Profile
 
Around 9 years of professional software development experience in analysis, design, development, testing and implementation of enterprise web applications for healthcare domain with good exposure to object-oriented design, software architectures, design patterns, test-driven development and agile practices.
 
In Brief
 
Analyse and create High Level , Detailed Design documents.
Use UML Modelling and create Use Cases , Class Diagram , Component Model , Deployment Diagram, Sequence Diagram in HLD.
 
Area of Working : Dedicated to Microsoft .NET Technologies
Experience with : C# , J2EE , J2ME, Windows Phone 8, Windows Store App
Proficient in: C# , XML , XHTML, XML, HTML5, Javascript, Jquery, CSS, SQL, LINQ, EF
 
Software Development
 
Database: Microsoft SQL Server, FoxPro
Development Frameworks: Microsoft .NET 1.1, 2.0, 3.5, 4.5
UI: Windows Forms, Windows Presentation Foundation, ASP.NET Web Forms and ASP.NET MVC3, MVC4
Coding: WinForm , Web Development, Windows Phone, WinRT Programming, WCF, WebAPI
 
Healthcare Domain Experience
 
CCD, CCR, QRDA, HIE, HL7 V3, Healthcare Interoperability
 
Others:
 
TTD, BDD
 
Education
 
B.E (Computer Science)
 
CodeProject Contest So Far:
 
1. Windows Azure Developer Contest - HealthReunion - A Windows Azure based healthcare product , link - http://www.codeproject.com/Articles/582535/HealthReunion-A-Windows-Azure-based-healthcare-pro
 
2. DnB Developer Contest - DNB Business Lookup and Analytics , link - http://www.codeproject.com/Articles/618344/DNB-Business-Lookup-and-Analytics
 
3. Intel Ultrabook Contest - Journey from development, code signing to publishing my App to Intel AppUp , link - http://www.codeproject.com/Articles/517482/Journey-from-development-code-signing-to-publishin
 
4. Intel App Innovation Contest 2013 - eHealthCare - http://www.codeproject.com/Articles/635815/eHealthCare
 
5. Grand Prize Winner of CodeProject HTML5 &CSS3 Article Content 2014

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 11 Sep 2013
Article Copyright 2013 by Ranjan.D
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid