Home > Software engineering >  Deploy C# .NET Webapplication on ubuntuu using mysql database
Deploy C# .NET Webapplication on ubuntuu using mysql database

Time:05-13

since long I try to host my web application on a linux ubuntu server. How do I proceed, someone can send me a guide. I didn't find anything after a long search.

I have already taken the first step and uploaded my database to the server. No clue whats next

CodePudding user response:

To run a C# application on Linux OS you need to develop it on .NET Core which supports cross-platform development.

  1. Check if your Linux server has dotnet installed with (src)

dotnet --list-runtimes

If not installed, install it with following.

sudo apt-get update;
sudo apt-get install -y apt-transport-https &&
sudo apt-get update &&
sudo apt-get install -y aspnetcore-runtime-6.0

  1. Then follow a simple guide for a sample project on asp.Net core e.g. this one
  2. Build your project and copy the files to your destination server path (e.g. from C:\MyUser\MyFirstWeb\bin\Debug\netcoreapp3.1 to /home/MyFirstWeb/ in server or if you already develop in Linux no need for this step)
  3. ssh to your server and run the application with dotnet MyFirstWeb.dll in its terminal

CodePudding user response:

Deploy an ASP.NET Core Application with MySQL Server Using Nginx on Ubuntu 18.04, may thats help you !!

https://www.digitalocean.com/community/tutorials/how-to-deploy-an-asp-net-core-application-with-mysql-server-using-nginx-on-ubuntu-18-04

  • Related