Working with .NET, ASP.NET Core hosting on NodeChef
NodeChef .NET Core hosting is based on managed docker containers in a production grade environment with integrated support for MySQL, MongoDB, PostgreSQL and Redis.
NodeChef takes care of the hard stuff like running your .NET containers in production, scaling, elastic loading, builds using the open source Cloud foundry buildpack and many other production ops.
This section provides details into what is supported and simple tutorials on working with .NET Core hosting in a production environment.
.NET Framework versions
Deploying your project folder
The platform supports .NET core application when one of the below conditions are met
Your project folder contains one or more *.csproj or *.fsproj files.
Your project folder contains one or more project.json files
The output directory of the dotnet publish command
To deploy a .NET Core application, simply zip your project folder or the output directory of the dotnet publish command and upload it from the dashboard
or you can also use the CLI by running the below command:
nc deploy -i hello-world-asp-net -bp dotnet
You must replace hello-world-asp-net with the name of the app you created on the NodeChef dashboard.
Listening for incomming connections on the PORT variable
Your app must use the environment variable PORT to listen for incomming connections, the below sample Main function works on NodeChef. The buildpack
automatically passes the PORT variable as an argument to the dotnet run command
public static void Main(string args)
var config = new ConfigurationBuilder()
var host = new WebHostBuilder()
Specify a .NET Framework Version to install in the Ubuntu Container
To lock the .NET Framework version in a .csproj app: