Showing posts with label hosting. Show all posts
Showing posts with label hosting. Show all posts

Monday, December 16, 2019

Deploy/Host a .Net Core App on a Low Cost Provider (InterServer)

As I am progressing in my journey with .Net Core (Razor Pages), I wanted to showcase my apps and gain some experience with hosting/deployment. But which place to choose? I came across many cheap solutions, out of which I chose https://www.interserver.net/


It's important to note that I want to avoid Azure for this purpose, as it is more costly and I use it only for my job related project to host databases. Of course, I tried the free tier app hosting and deployment, but anyway I need to try a more serious cheap solution, that has way more apps/databases with a lower cost. That's how I came across the above mentioned ASP hosting provider.

Just as a quick note, a list of comparable cheap hosts is presented in this article:  https://dottutorials.net/best-fast-cheap-windows-hosting-asp-net-core/


I purchased the 5 USD/month tier, which contains, most importantly:
- 25 sites
- unlimited databases (MYSQL, MS SQL)
- unlimited storage.

Let's log in to their site, after paying the amount, and use Plesk to manage my sites.

After entering PLESK,  let's see how we can deploy our asp.net core web app!
The following screen appears.

1.  you can add subdomains. I added test3.zoltanhalasz.net (my domain being zoltanhalasz.net)
2. In a subdomain or web site, there will be a dashboard with many functionalities.
3. Download the file from web deploy publishing settings.
4. Go to Visual Studio.
5. Select the Web project (such as Razor pages), hit publish, we will choose web deploy


6. Hit new
7. Import profile - here use the file downloaded at 3)
8. Use the settings from the screenshots below:





Hit Save, and then Publish.
After some minutes, the site should be opening in your browser.
The files (package) deployed will be visible under the File Manager, found in the Plesk dashboard.

How to add a database?

I created a DB, MS SQL Type. It is immediately visible from your local MS SQL Studio, and in 12-24 hours, also from your myLittleAdmin (dashboard app from PLESK).

Any database can be added to an app's connection string (the local ones from Plesk, or even from Azure) and the applications will work.