Posted by Anuraj on Monday, March 21, 2016
Ubuntu is a Debian-based Linux operating system and distribution for personal computers, smartphones and network servers. This post is about running ASP.NET Core application on Ubuntu VM running on Azure and making the application accessible via browser. First you need to install DNX runtime on the server, you can find more details about the installation from ASP.NET Docs site. You need to run the following commands as sudo in terminal.
Installation is completed. Now you can run the ‘dnvm list’ command to verify the installed runtimes. Get the samples from ASP.NET Home. Open terminal and extract the zip. Navigate to the samples directory and execute ‘dnu restore’ and ‘dnx web’ command. Here is the screenshot of the application running from terminal.
Now you can navigate to the Azure endpoints tab, and add an HTTP endpoint, public port will be 80, and private port will be the port where your ASP.NET application running, in this case private port is 5000.
Now you can browse the application from your system with the vmname.cloudapp.net URL.