by heroku-softtrends

GitHub Readme.md

Softtrends .NET Core 2.x Buildpack for Heroku

(Sample Code with Heroku Button deploying ASP.Net Core 2.x)

This uses the .Net Core 2.x Buildpack provided by Softtends and adds full support for Heroku

We've made some big updates in this release, so it’s important that you spend a few minutes to learn what’s new.

You've created a new ASP.NET Core MVC project. Learn what's new

You need to make the following changes in your Program.cs to deploy on Heroku
In Program.cs

  • Add UseUrls method and pass args[0] as parameter to start your app. Because Heroku web dyno will start with dynamic port after sucessful deployment. We need to use the same port in code behind also then only your app will start and listen on that port else dotnet runtime will set default port 5000. Thereby we pass port number as parameter with url in Procfile

public static void Main(string[] args {
{ BuildWebHost(args).Run(); } public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup() .Build(); }

You can deploy this ASP.Net MVC website on Heroku server by clicking below button


This application consists of:

  • Sample pages using ASP.NET Core 2.x MVC
  • Gulp and Bower for managing client-side libraries
  • Theming using Bootstrap

How to


Run & Deploy

We would love to hear your feedback