How to upload ASP.NET Core website to hosting

Installing Asp.Net Core software
  1. After entering the control panel, go to the "System> SSH terminal" page and enter the username and password of your control panel in the displayed terminal (log in).
  2. To add an Asp.Net Core repository, type the following command in the terminal "wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && sudo dpkg -i packages-microsoft-prod.deb".
  3. To install the Asp.Net Core SDK package, type the following command in the terminal "sudo apt-get update && sudo apt-get install -y apt-transport-https && sudo apt-get update && sudo apt-get install -y dotnet-sdk-5.0".
  4. To install the Asp.Net Core Runtime package, type the following command in the terminal "sudo apt-get update && sudo apt-get install -y apt-transport-https && sudo apt-get update && sudo apt-get install -y aspnetcore-runtime-5.0".
Launch the Asp.Net Core website
  1. By typing the following command in the terminal "sudo mkdir /dotnet_mvc_test && cd /dotnet_mvc_test" create a folder for the Asp.Net Core project where you will create the site project.
  2. To create a new project, type the following command in the terminal "sudo dotnet new mvc".
  3. To create a project build, type the following command in the terminal "sudo dotnet publish --configuration Release", After which a project build will be created at the following address "/dotnet_mvc_test/bin/Release/net5.0/publish/".
  4. To run the Asp.Net Core site, type the following command in the terminal "nohup sudo dotnet /dotnet_mvc_test/bin/Release/net5.0/publish/dotnet_mvc_test.dll &".
  5. In case of server reboot to automatically start Asp.Net Core website, go to the next page "System > SSH terminal" and in the text field below the terminal (The script runs automatically when the system starts) type the following command "nohup sudo dotnet /dotnet_mvc_test/bin/Release/net5.0/publish/dotnet_mvc_test.dll &" and click "Save" button.
  6. To be able to open the Asp.Net Core site in a browser, go to the next page "Domain > HTTP Reverse proxy" and select the desired domain or subdomain with which you want to open the Asp.Net Core site, also in the field "Redirects to" type the following address "https://localhost:5001" and click "Create".
  7. Wait 5 minutes and log in to your chosen domain or subdomain with the browser, after which the Asp.Net Core site will open.



  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Web Hosting Control Panel

Web Hosting Control Panel allows you to manage server configurations (domains, email, databases,...

How to upload NodeJS website to hosting

Installing NodeJS After entering the control panel, go to the "System> SSH terminal" page and...

How to change PHP configuration

PHP configuration settings can be changed on the "System> PHP settings" page. if you need to...

Change web hosting configuration (Upgrade or Downgrade settings)

To change (Upgrade or Downgrade) your web hosting configuration, go to the Services page  and...

Web Hosting Purchase Instructions

To purchase web hosting, go to the following link and select your desired configuration. When...