Tag Archives: ubuntu

Running ASP.NET MVC via DNX on Ubuntu 15.10

My steps I did to get my ASP.NET MVC application I created on my Windows 10 box running on a Ubuntu 15.10 server.

Setup ASP.NET 5 on Ubuntu following this:
http://docs.asp.net/en/latest/publishing/linuxproduction.html
http://docs.asp.net/en/latest/getting-started/installing-on-linux.html

Update dnvm on windows:

dnvm updateself
dnvm upgrade -r coreclr

Fix the libicu for Ubuntu 15.10:

wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb
dpkg -i libicu52_52.1-8ubuntu0.2_amd64.deb

Say the web project is “WebApplication1” then console into that folder:

dnu publish
dnx web

Hit localhost and make sure the page load.

Copy the entire “WebApplication1” folder to linux box.
Restore the packages from the “WebApplication1” folder copied to the linux box:

dnu restore
dnx web

Enjoy!

ASP.NET MVC 5 Preview

Managed to get ASP.NET 5 preview up and working via Visual Studio 2015 RC in a Docker container hosted on my local Ubuntu server (read; not an Azure hosted server). All in Oracle VirtualBox Virtual Machines.

ASP.NET 5 Preview Running on a Local Docker Ubuntu VM
ASP.NET 5 Preview

My VirtualBox host is a Windows 8.1 box and I used two VMs: a Windows 7 Development Box (I tried Windows 8.1 in a VM and the performance was terrible) and a Ubuntu Server 14.04.2.

For the most part it was pretty much documented here. My only hiccup was that I had to do a “Restore Packages” to get Grunt to install its packages, this didn’t happen with a “Rebuild” as I would expect. I set my “Custom Docker Host” settings like this:

Custom Docker Settings For Publishing To Docker Server
Custom Docker Settings

After publishing from Visual Studio I was able to get a list of the images on the Docker server and it now included the new published app:

{
    Created: 1432561734,
    Id: "0ad5302ad774376604042790713f79ffa98fceca9826159bcd93b1e20dfce552",
    Labels: {},
    ParentId: "becb4b73fe255ab7284cfdcf3f5768520736317cd5f0456bf169bb9f441763d3",
    RepoDigests: [],
    RepoTags: [
        "helloworldweb1:latest"
    ],
    Size: 0,
    VirtualSize: 756665995
},

So the next challange is to get MongoDB setup running in a Dockerized instance on my Ubuntu server then create a ASP.NET MVC application consuming that server and publish that via Docker and see how performance and maintenance plays out.

 

ASP.NET 5 on Ubuntu on VirtualBox

I figured out the magic sauce for getting ASP.NET 5 running on Ubuntu 14.04 in a VirtualBox VM.

asp_6_on_ubuntu_vm

I followed this mostly for the setup but your Dockerfile should look like this:

FROM microsoft/aspnet

COPY project.json /app/

WORKDIR /app

RUN ["dnu", "restore"]

COPY . /app

EXPOSE 5004

ENTRYPOINT ["dnx", "project.json", "kestrel"]

Be sure and set your VirtualBox setting to “Bridged” so you can hit the IP from your workstation.

Enjoy!