Skip to main content

ASP.NET 5(vNext) on Ubuntu 14.4(Linux)

As we all know Microsoft has recently launched ASP.NET 5 and Microsoft has made announcement that it will work on any version of Linux and OSx. So in this post we are going to learn how we can use ASP.NET 5 on Ubuntu.

Installing Ubuntu on Oracle Virtual Box:

As I don’t have spare computer where I can install Ubuntu so that I’m going to install it on Oracle Virtual Box. If you don’t know about Virtual Box then it it a powerful x86 and AMD/Intel 64  virtualization product for enterprise or home box. It is freely available as GNU Licence.

You can find more about  Oracle Virtual Box here- https://www.virtualbox.org/

There are few things you to consider before going this route.
  • You need to first make sure that your computer supports virtualization or not. There are some utilities available for that like Intel processor identification utility – You can download from the here- https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=7838. It will tell you whether your processor supports Virtualization or not.
intel-processor-utility
  • After checking whether your processor supports virtualization, you need to enable virtualization from Bios. That is different as per your Processor and you can learn how you can enable virtualization on your pc via searching on internet.
  • Make sure you have at least 4 GB ram to run this virtual OS smoothly. If you less RAM then it will work but thing will be slow.

How to install Ubuntu on Oracle Virtual Box:

There are lots of sources available on internet so I am going to show you step by step installation walk through Here. Followings are some of links I have used.

https://www.youtube.com/watch?v=QkJmahizwO4
http://www.wikihow.com/Install-Ubuntu-on-VirtualBox

Here I would like to mention in Network settings of your Virtual OS please select bridge adapter which will use your parent PC Internet.

Bridge-Adaptor

Another tip to make clipboard available to Bi-directional so that you can copy past from parent to virtual and virtual to parent OS.

ClipBoard

Installiing ASP.NET 5 (VNext):

It’s very easy to install ASP.NET 5(vNext) on Ubuntu and Graeme Christie has already written a great post to install ASP.NET 5  on Ubuntu. I have completely followed his post and I would recommend you to follow the same.

Here is the complete post for Installing ASP.NET 5(vNext) on Ubuntu- http://graemechristie.github.io/graemechristie/blog/2014/09/30/asp-dot-net-vnext-on-osx-and-linux-redux/

Here are some of screenshot I have taken while running command as per the above post.

Upgrade your package cache:

app-get-upate-ubntu-asp-vnext

Installing mono develop:

apt-get-ubntu-mono-develop-install-for-asp-net-vext

Adding certificate to store:

certificate-store

Checking Mono Version: Make sure you have mono 3.8 or higher version.

Mono-version-avnext

Install Curl:

install-curl

Bootstrap KVM:

bootstrap-kvm-image

KVM Upgrade:

Kvm-Upgrade

Install Git:

Install-Git

Git Clone of David Fowler Repository:

git-clone

KPM Restore on HelloWorldNext directory:

Kpm-Restore

CD to Source Directory:

cd-source

Web Server Started:

WebServer-Started

Browser:

Hello-World

That’s it. Hope you like it. Stay tuned for more!

Comments

Popular posts from this blog

How to create Rest API(Web API) with ASP.NET Core 1.0

Recently Microsoft has released ASP.NET Core 1.0 RC2, I am getting lots of request from readers that about creating Web API. So I thought it will be a good idea to write a blog post about how to create Rest API(Web API) with ASP.NET Core 1.0.

So let’s get started via creating an ASP.NET Core 1.0 Web Application like following.



Once you click on ASP.NET Web Application, It will ask whether you need to create Web Application or Web API application. We are going to Web API so I am going to select Web API Application like following. Please note that in ASP.NET Core 1.0 there is no separate libraries or DLLs required for creating web APIs. This is just a project template.



Now once you click on OK It will create a Web API application with default values controller and program.cs.  As you know Program.cs is now starting point for the ASP.NET Core 1.0 application so It contains all the required configuration and startup items. Following is a code for that.
using System.IO; using Microsoft.Asp…

How to use migration with Entity Framework Core

Entity framework core is  the lightweight, extensible and cross-platform version of Entity Framework. Before some time, Microsoft has Released a new version of Entity Framework RC2. I have written a couple of blog post about Entity framework code first migration earlier for Entity framework 6.0. So there was a couple of request coming for writing a blog post about Entity Framework Core RC2 migration. So I thought it will be a good idea to give an overview how database migration works in Entity Framework Core RC2. This post will cover a basic scenario where we are going to create the database with existing ASP.NET Identity migration and then we are going to create a new model and have that migration applied in the database.

How to use Entity Framework Migrations: Let’s get started, To demonstrate entity framework core migrations, I am going to create a sample asp.net core web application like following.



Once we select asp.net core application it will appear the following dialog.



Now w…

Creating PDF with ASP.Net MVC and RazorPDF

Update: I have written a new blog post about better approach to create a PDF with asp.net mvc- You can find that following location.- A Better Solution to create PDF with Rotativa and ASP.NET MVC
In this post we are going to learn how we can easily create PDF from ASP.Net application with the help of Razor PDF NuGet package.

About Razor PDF:
This NuGet package is created by Al Nyveldt It internally uses ITextSharp an open source PDF convertor library. RazorPDF uses Razor View engine to create iTextXML which is in tern used to produce PDF file. You can get more information about that at below link.

https://www.nuget.org/packages/RazorPDF

Example(Creating PDF with ASP.Net MVC):
So what we are we waiting for ? Let’s create a simple example. To create example first thing we need to a create and ASP.Net MVC application.