Tuesday, March 28, 2017

Running Asp.net Core Web Application and Web API project on Ubuntu

Step 1: Install .Net Core on Ubuntu using this link

Step 2: On Terminal (Cntrl + Alt + T), go to /home/ directory.  Create dir.  i.e.: mkdir coredemo  If you are new to ubuntu:  /home/ directory is place where it is good to store user specific stuff.

Step 3: If you are creating

Asp.net Core web application, run command:  dotnet web

Asp.net web api, run command:  dotnet api


Step 4: dotnet restore

Step 5: dotnet run


For Testing:

  • Asp.net Core Web application, type in browser: http://localhost:5000  
  • Asp.net Web Api application, type in browser: http://localhost:5000/api/values


(Note: It is possible that port might be different for you, if that is the case change accordingly)

Things to note:  Above approach is using kestrel as web server.  In next post, I will explain how to host both web and api on nginx server.

No comments:

Most Recent Post

Subscribe Blog via Email

Enter your email address:



Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.
Page copy protected against web site content infringement by Copyscape