Huygens 1.3.2

There is a newer version of this package available.
See the version list below for details.
Install-Package Huygens -Version 1.3.2
dotnet add package Huygens --version 1.3.2
<PackageReference Include="Huygens" Version="1.3.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Huygens --version 1.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Huygens, 1.3.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Huygens as a Cake Addin
#addin nuget:?package=Huygens&version=1.3.2

// Install Huygens as a Cake Tool
#tool nuget:?package=Huygens&version=1.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


Cut down CassiniDev server for internally hosting IIS sites

Derived from and released under the same license.

Library to load, host and run ASP.Net websites inside your own process. Has functionality equivalent to the IIS Developer server. Can expose IP ports or keep sites internal to your process. Supports .Net MVC and Web APIs

The library contains a set of interfaces and wrappers under the Huygens.Compatibility namespace, to help convert between the many different HTTP request and response types in the .Net ecosystem.

To do:

  • Decode HTTP chunked responses?
  • Add streaming input/output to direct server
  • Add OWIN rq/tx to the compatibility classes
  • Accept null Headers on requests

Internal hosting

You can host a site without exposing on an IP port like this:

using (var server = new DirectServer(@"C:\inetpub\wwwroot\PublishSample")) // a published site
    var request = new SerialisableRequest{
        Method = "GET",
        RequestUri = "/values",
        Headers = new Dictionary˂string, string˃{
            { "Content-Type","application/json" }
        Content = null

    var result = server.DirectCall(request);

    var resultString = Encoding.UTF8.GetString(result.Content);

Creating a new DirectServer takes a few seconds, but it can handle an unlimited number of DirectCall requests. More than one site can be hosted in a parent process.

External hosting

You can expose the site to a port like this:

using (var server = SocketServer(32768, "/", @"C:\inetpub\wwwroot\PublishSample"))

    // accessible to web browsers etc.


Creating a new SocketServer takes a few seconds, but it can handle an unlimited number of calls. Note that if you want to host more than one SocketServer in your process, each must have its own IP address.

Azure hosting

You can't use the SocketServer on Azure, due to permissions limitations. The DirectServer is usable as long as you have a B1 or higher application service plan, and your host app has the Application Setting WEBSITE_LOAD_USER_PROFILE = 1 You can also host the DirectServer in a 'Web Job', 'Worker Role' or 'Service Fabric' resource.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.0 444 5/29/2019
1.4.5 7,993 8/7/2018
1.4.0 486 8/6/2018
1.3.2 487 7/24/2018
1.3.1 466 7/23/2018
1.3.0 449 7/19/2018
1.2.0 518 7/9/2018
1.1.0 532 7/5/2018
1.0.0 518 6/1/2018

Handling closed app-domains for long-running processes