ScottGu’s Blog – Introducing ASP.NET 5

ASP.NET 5 is an open source web framework for building modern web applications that can be developed and run on Windows, Linux and the Mac. It includes the MVC 6 framework, which now combines the features of MVC and Web API into a single web programming framework.  ASP.NET 5 will also be the basis for SignalR 3 – enabling you to add real time functionality to cloud connected applications. ASP.NET 5 is built on the .NET Core runtime, but it can also be run on the full .NET Framework for maximum compatibility.

via ScottGu’s Blog – Introducing ASP.NET 5.

Getting started with ASP.NET 5/ vNext and MVC 6

Today I came across with good white paper written by Telerik, it discusses about some of the burning questions we have about ASP.NET 5. For me, it answered lots of questions I had about ASP.NET 5. This is the link for white paper.

After I read this white paper, I thought to compile a list of resources to get insight about ASP.NET 5/vNext and other related technologies like MVC 6.

First of all I’ll share this course from Microsoft Virtual Academy about ASP.NET 5, this is a lengthy course about ASP.NET 5 but it definitely worth the time.

These are some of blog posts I found from various locations.

This is another set of blogs about ASP.NET 5 and MVC 6 by Stephen Walther, since world now move towards client-side MVC frameworks, I think this is good set of tutorials about how to use ASP.NET 5 with AngularJS.

I will update this post time to time with new resource I see. Hope this helps you. 🙂

[Update 2015-02-10]

Good article about debugging ASP.NET Framework libraries using VIsual Studio 2015.

[Update 2015-02-24]

Found new set of blogs by Filip W about few advanced topics on ASP.NET 5 and MVC 6

Run ASP.Net (vNext) Application on Linux with Docker

While surfing MSDN blogs today early morning, I saw this blog post about hosting ASP.Net application in Linux virtual machine in Azure. After I read this great blog post, first thing came to my mind was why don’t I install Linux locally on a VM and try the same scenario. In this blog post I’ll describe step by step installation and configuration of Ubuntu, Docker and run ASP.Net application in it.

Download Ubuntu iso image. Using this image you can create Ubuntu VM either using VMware Player/ Workstation or Hyper-V. In my case I used Hyper-V. It doesn’t matter what hypervisor you use, only woking Ubuntu VM/ machine needed.

You can update your VM to latest version if needed after the installation, since I like to use latest updates, I installed all updates to my VM.

Install Docker on Ubuntu

You can read full article about intalling Docker on Ubuntu from this link. I extracted the necessary information from it and stated it below.

1. Check whether APT can work with https URLs, if not install apt-transport-https.

2. Add Docker repository to your local keychain

3. Update your repository and install Docker

Please go through this tutorial for get more information about installing Docker in Linux.

After finish installing Docker, when you run docker you should get output as below screen.


Prepare Docker container

1. I’m going to use vNext ASP.Net project at GitHub.

2. Create Dockerfile and add content specified here.

From above code it does following things.

  • FROM microsoft/aspnet Get the base image for ASP.Net from Microsoft
  • COPY . /app Copy content of current folder (HelloWeb) to /app directory of the container
  • WORKDIR /app This sets current working directory to /app folder
  • RUN ["kpm", "restore"] Download all the dependencies of the application
  • EXPOSE 5004 Informs Docker that the container will listen on the specified ports at runtime. Docker uses this information to interconnect containers using links and to determine which ports to expose to the host.
  • ENTRYPOINT ["k", "kestrel"] ENTRYPOINT command is used to keep the container as executable. In this case, it’ll start kestrel server which will host ASP.Net site.

Build and run container image

1. Run Docker build command to build the image

2. Check available Docker images

3. Run Docker container

  •  -t switch attaches a pseudo-tty to the container (this switch will not be necessary in future versions of ASP.NET 5).
  • -d switch runs container in background.
  • -p switch maps local 80 port to 5004 port in container.
  • myapp is the Docker image we are going to use

4. See currently running containers

5. Goto http://localhost from browser



Now you have a ASP.Net vNext site running on Linux with Docker. 🙂

Try it out and let me know what happen. Happy coding!! 🙂