DEV Community

Michel Renaud
Michel Renaud

Posted on

Anyone using ASP.NET Core 3.x on a Linux shared web host?

First post and unfortunately it's not some sharing of knowledge, but rather some desperate questions. Not sure I got the syntax for tags right.

Long story short, my web host has apparently been hit by ransomware and I'm looking at alternatives.

My web site is currently PHP and MySQL, but I'm rewriting it using ASP.NET Core and - so far - a SQL Server back end. That host was able to provide these features without breaking the bank(...)

I've been looking at other ASP.NET Windows hosts and the features are either lacking, outdated, or out of my price range. So, I'm beginning to wonder if I could deploy my ASP.NET Core web site (if I ever get around to finishing it) to a Linux shared host (there's talk of nginx in the Microsoft documentation) and possibly targeting MySQL instead of SQL Server.

So... questions:

1) Has anyone here had any experience with deploying an ASP.NET Core site to a Linux shared host?

2) Any experience with EF Core 3.0 and MySQL? I'm not married to SQL Server, it's just usually easier to use with .NET.

Bonus question (3) Any hosting recommendations?

This was supposed to be a relaxing weekend where I'd be experimenting with Vue.js...

Discussion (16)

Collapse
anthonyrtapia1 profile image
Anthony R. Tapia
  1. Never try it. Always use Windows to deploy .net website.
  2. You are right, it will easier using .net.
  3. Asphostportal for windows hosting. You can try them.
Collapse
metalmikester profile image
Michel Renaud Author

I found a Linux web hosting company that uses Nginx instead of Apache, but when I inquired, they had no idea what .NET Core was (which is pretty sad, considering it's been out for a few years and which much fanfare...) So that's that.

Asphostportal and Tmdhosting are two hosts that are mentioned a lot on a user-run Facebook page created after the ransomware attack. My site has been running fine for several days now. My hosting is paid up for a while still (I took advantage of a deep discount a couple of years ago), so I'm going to stay there as long as there are no major problems. I'm not making daily backups myself, so this time if I want to move I won't have to worry about losing content like the last time.

I was reading about a new multiplatform ransomware that specifically targets server, so it looks like we're not safe anywhere anymore.

Collapse
anthonyrtapia1 profile image
Anthony R. Tapia

That's why I don't want to run .net Core on Linux, still doubt about it.

If I were you, better to find new host. If you want to keep your site with them, you MUST always backup your files. I'm afraid it can happened again, like A2. The hacker have known their server configuration. So, just beware!

Thread Thread
metalmikester profile image
Michel Renaud Author

We run .NET Core on Linux servers at work without any issues. When it comes to shared hosting, however, if they don't know anything about it, they can't help if you run into configuration issues and the likes.

Thread Thread
anthonyrtapia1 profile image
Anthony R. Tapia

Sorry if I'm not fully agree with you. My overall experience is quite good. I basically choose the provider that specialize in their field. For example, I use .net so I choose the provider has been in this business for more than 10 years or more, they have good technical support and can give advice. They will try to give solution if you have problem or issue. Honestly I never run .net on Linux, so I can't comment anything.

Thread Thread
metalmikester profile image
Michel Renaud Author

I'm not talking about .NET, I'm talking about .NET Core, which was built from the ground up to be multiplatform (Windows, Linux, Mac). It's been out for more than three years.

Thread Thread
anthonyrtapia1 profile image
Anthony R. Tapia

Yes, I know, what I meant above is .net core. I know that .net core can run on Linux, but I don't know whether it is stable or not. That's why I stick with Windows server.

Thread Thread
drdream profile image
Tim Davis

This comment is very outdated to be posting in 2019. and quite frankly its rubbish..Net core runs just fine on linux with just one package (the .net core runtime).. so its as simple as installing that package. You will indeed get lost in a land of proxy servers, config files, and what not but it does work. Not only that but you can run that same code on Android, IOS, OSX, Docker, and Cloud compute instances.

Thread Thread
metalmikester profile image
Michel Renaud Author

Indeed. We've been running .NET Core apps on Linux servers (and Windows servers - we use a mix) at work since late 2017/early 2018 without any issues. My problem has been finding a Linux shared hosting solution that supports it. I'm not sure I want to bother with administering a VPS. But development is going very slowly for various reasons, soooo... :(

Collapse
katnel20 profile image
Katie Nelson • Edited on

I am doing EFCore 3.1 with MySQL right now. No problems when you use the Pomelo provider. But I’ve only tried it on Windows.

Collapse
samgithub profile image
samgithub

Hi Michel:
Did you have any luck getting NETCore to run at a Linux shared hosting provider?

Collapse
metalmikester profile image
Michel Renaud Author

I did not find one that explicitly mentioned support for it, and I didn't ask the couple of hosts that I'm looking at (they both support Windows shared hosting). I found one discussion on the WebHostingTalk forums where a person was asking the question and the answers were "don't do it", though it was obvious that those saying it had zero experience with it. They see ".NET" and still see it as a Windows-only thing. Meanwhile, at work, we have .NET Core apps running on Linux (and Windows) servers without any issues.

I've considered a VPS since many are priced low with specs that would support my web site, but I'm not sure I want to get into that kind of trouble. Lots more configuration and maintenance, I would think...

Collapse
drdream profile image
Tim Davis

Hello this is the route I went not because of any bias on shared hosting, but because im building a network where I need certain resources (bandwidth, storage, compute) for cheap... You get root control and can set up everything. I use Azure DevOps for Build and Deploy to a VPS. You can find dirt cheap VPS's here serverhunter.com. VPS slices can be had for the same price as shared hosting at $3.50 a month. My theory is this.. Datacenters were built, many hosting companies rented physical space/servers.. Companies like Wordpress, Azure, and Amazon wiped them out. New virtualization technology came along (docker, kuberneties, KVM, Hyper-V).. Which allows you to just buy some slice anywhere in the world.

For database I wouldnt consider MySQL cause it may be too much for me.. I would look into postgres and EF Core or litedb (litedb you dont even need an orm). After going through this process I suggest to just run the app directly with either kestrel or do it with no proxy (theres an article floating around how to do it)

Collapse
zoltanhalasz profile image
Zoltan Halasz

I deployed one of my projects, on azure linux app service hosting. It's cheaper than the windows hosting. azure.microsoft.com/en-us/pricing/...