forked from NancyFx/Nancy
-
Notifications
You must be signed in to change notification settings - Fork 0
Hosting Nancy with wcf
Andreas Håkansson edited this page Aug 3, 2013
·
3 revisions
Nancy is a great choice for applications that want to run a lightweight HTTP server without the overhead of IIS. To do this, take the following steps:
Make sure you have the Nancy WCF hosting libary referenced - Install the package using Nuget
PM> Install-Package Nancy.Hosting.Wcf
Then host it with WCF
var host = new WebServiceHost(new NancyWcfGenericService(),
new Uri("http://localhost:1234/base/"));
host.AddServiceEndpoint(typeof (NancyWcfGenericService), new WebHttpBinding(), "");
host.Open();
// Nancy will now handle requests to http://localhost:1234/base/
Be sure that your project is using the full .NET 4.0 framework and that you have referenced both System.ServiceModel and System.ServiceModel.Web (for the WebServiceHost class).
- Async
- Taking a look at the DynamicDictionary
- The before and after module hooks
- The Application Before, After and OnError pipelines
- Model binding
- Bootstrapper
- View Engines
- View location conventions
- Localization
- Testing your application
- The root path
- Managing static content
- Diagnostics
- Adding a custom FavIcon
- Generating a custom error page
- The cryptography helpers
- Content negotiation
- Authentication
- More to come