Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Have you found any good managed places to deploy modern .NET apps other than Azure? My experience is you can either use Azure, in which it's fairly abstracted for you but overpriced, or you can use something like DO where it's more reasonably priced but you have to handle everything yourself.


Just for clarity for others passing through this thread ...

Current .NET produces stand-alone cross-platform executables just like many other stacks.

Unless you're forced to do legacy stuff, there is no Framework any more, and no Windows or IIS needed. They build and deploy exactly like other ecosystem executables because that's exactly what they are. You can even generate a Linux server build from Windows and MacOS. And it also works fine with standard container stuff.

By default a .NET web app or API is a stand-alone server, with optional https built in, and you can either sit it behind a proxy like nginx or you can direct traffic straight at it. In summary, forget all the old stuff about frameworks, Windows, and IIS. If you're doing your own project and not working legacy stuff you don't need any of it.


Fly.io works great. .NET will generate the Dockerfile for you already so it's pretty easy to set it up. Fly.io will even give you a hosted PostgreSQL.

DigitalOcean's App Platform should also handle .NET apps as easily as anything else.

.NET makes it easy to get your app all set for Docker and there's a lot of platforms that will take Docker containers or even build them from your repository.

I guess I'm wondering what managed services for other languages feel more managed/easy than Fly.io or DO's App Platform taking your repository, building it, and launching it.


I think we need to be super precise when we use the word "managed". Today, we use EC2/Azure VMs to run a lot of .NET 6+ apps. I consider these to be managed resources. My involvement with those servers is an email from the hypervisor ~once a year politely requesting a reboot.

I don't think .NET has any specific implications regarding where the product is hosted. If you are referring to the Microsoft insight/Azure integration crap, we use 0% of that.


That's basically what I mean. I just want to deploy the app and not have to worry about anything OS-related, including IIS config, SSL, etc.


That's exactly what I do - I build a monolith using the self-contained deployment feature and zip it up to the server to run.

The management of certificates, configuration, etc. is built directly into any product I work on. Outsourcing this stuff to IIS, et. al. is exactly how you wind up hating all of this tech in the first place.

Prerequisites are zero if you do this right. I can take a blank EC2 server, copy the binaries over and run them immediately. I don't even have to install any runtimes or SDKs.


How do you setup your webserver. This is the most challenging part for me.

Here's my process. Build locally, publish, upload to server, dotnet run... Now what?


Modern .NET contains the web server. It's not an external thing anymore. You include a .NET library to host your stuff. Check out the minimal api reference:

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/s...

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/m...

Literally everything runs inside your process now, including the database if you go for SQLite.


C# is heavily influenced by golang now. Run with 0 dependencies. Web server bundled.


> C# is heavily influenced by golang now

Source ?


Looks like you can run containerized .NET apps via GCP Cloud Run

https://cloud.google.com/run/docs/fit-for-run


This is what I do.

* CloudRun - .NET in Docker * CloudSQL - Managed Postgres


AWS has been aggressive in .NET support in the last couple of years: https://aws.amazon.com/developer/language/net/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: