65 comments

[ 2.8 ms ] story [ 93.6 ms ] thread
what are some other problems with ASP.NET core for now?
I feel like Kestrel could be better. I've hit some issues in production (on Linux) there is no other choice.
What issue did you it? I'm quite interested as we're looking into using asp.net core on Linux too.
I run production on Linux - it's been great. No problems and such a nicer experience than say nodejs thanks to strong typing, great debugging and integration tests.

The only negative things I hear is when people assume it is meant to be internet facing and looking for out of the box load balancing or some such. For it's intended purpose behind a reverse proxy like nginx, I've had zero issues or missing features.

Which framework manages load balancing?

I've used flask, django, rails..and even Gorilla (go) none has loadbalancer.

it has problem in docker environment. Memory usage goes over the limit and causes all the other docker instances on same machine to become unresponsive.

I usually put memory limit to the docker instance with .net core. After doing this its been running great. stable, lightning fast!

Kestrel is pretty weird to use on its own. I had the need to write a service, with a http api built in, a few years ago. This was before ASP.NET Core.

It's not really that intuitive to use, compared to the offerings from languages like Go or Python. At least at that time it seemed like there was a lot of boiler plating code, that you wheren't really expected to understand, and the documentation really only go you to the point where things sort of worked, but you didn't really know why or how you where suppose to move on.

What part about Kestrel was wierd? I find the middelware model simple and powerful. Some of the middelware pieces that MS provide can be very frustrating to figure out, I give you that.
Mostly the initial setup and URL mapping. It could just me not having written C# for a long period, but when you normally use something like Flask og Gos build in "web framework", the mental overhead of Kestrel is honestly a bit much.
I've been using nginx as a reverse proxy to kestrel in Linux. Has been working great for me
Telemetry and packaging are the big ones.
Could you give some details about packaging?
The whole packaging process is a bit wonky. I’ve had a couple of broken or buggy builds on Debian.
It's it just build and then copy/rsync/whatever?
I find it striking how many of the blind spots wrt the web have been a feature of ASP.NET since the beginning: static file serving, caching, authorisation...
It was originally developed to be used with IIS which handles all of that.
IIS is not coming to Mac or Linux ( is a good thing !) - so you can/ will rely on Apache or NGINX to “front” your code just like you would for Ruby or Python or Node.
How do you mean?

I've done a few projects using ASP.Net Core and they've used all of those

It's not that you can't, it's just that there are some short comings that many will quickly hit. It's described pretty well in the article.
If you're saying these things are "missing" from aspnet core then yes -- it's by design. All of this is handled through middleware, the same as in NodeJS. You can very easily create aspnet core projects with all of the above but MSFT isn't making overly dogmatic opinions about how you should do each of those things or even that you need to use their solutions for each.
They’ve literally just launched a library that adds conventions to Swashbuckle. Not saying it’s not useful, just that serving static files probably ought to be higher on their priority list.
The main pain points for me regarding .NET Core has been the lack of third party libraries, hard to understand sometimes which project can run on .NET Core and several cases that I had to switch back for smaller projects in order to use a specific library.

.NET Core is great, but I would continue to run it on .NET Framework for now.

What kind of libraries are you missing?
Most of the key Nuget packages we regularly use do target .NetStandard, so can be used in .Net Core:

- Autofac - Automapper - EntityFramework Core - MassTransit - MediatR - Moq - Newtonsoft.Json - NodaTime - NUnit - Quartz.Net - RabbitMq.Client - RestSharp - Serilog

The only thing we use .NET Framework applications for is Windows services through our use of TopShelf since it does all the heavy lifting surrounding windows service's lifetime management. All our other apps are .NET Core though.

We build a lot of CQRS / DDD style applications, and the above list covers us off pretty well for our architecture that uses RabbitMq for messaging.

Would be interested to know which packages you are missing?

On my case, ODP.NET is the big show stopper.

So far, Oracle only bothered to port a subset to their .NET Core managed driver.

However there are some features like UDT, distributed transactions and specific cipher modes that are only available on the native driver.

Due to this, I have already done a .NET => Java port of a server application, because the customer required migration to UNIX servers and the JDBC driver had 100% feature parity with what we required.

Switching to other RDMS is not an option on Oracle heavy enterprise shops, it has plenty of nice features at scale and UI tooling.

Is ASP.NET Core platform popular among developers who use non-Windows platform? Can we develop applications on top of ASP.NET without Visual Studio?
You can develop using VS Code + build using command line tool "dotnet".
Visual Studio Code is reasonably popular. It’s available on Windows, macOS and Linux. It even offers debugging.

Though you can basically use any editor.

I have been on Ubuntu for roughly the past 2 years, doing primarily .NET. It is fairly comfortable.

VSCode works, but I enjoy Rider.

"VS for Mac" is surprisingly decent these days. Change it to a dark theme and reduce the font-size and it's a good experience. It's much more stable than some of the earlier versions when packaged as "Xamarin IDE".
As someone who has been using Linux as my daily driver for over a decade, and is now using .NET Core at dayjob, Rider is FANTASTIC. The latest EAP (early access program) which is about to be released is very, very nice. Absolutely amazing. They are the company behind resharper, which is very popular.

Can't stand Windows, and Visual Studio is pretty terrible as well (IMHO), it always freezes on my beefy hardware (32 core threadripper, oodles of RAM, NVME, etc).

> it always freezes

FWIW, VS freezes for me come mostly from Resharper. I'm still debating whether the small productivity gain is worth it. Pretty much the only thing I'm really missing without Resharper is the smart completion which VS doesn't do well on its own.

It's kinda funny, though, how Jetbrains touts Rider's performance because the Resharper engine runs in a separate process. Something that Microsoft has recommended VS extensions that do a lot of hefty processing to do since VS 2008 ...

We gave up on ReSharper a couple of months into using it. It's an amazing tool but the performance hit on VS just isn't worth it.
Yes, developing on VS Code using MacOS without any issues so far.
I'm doing ASP.NET Core on a Macbook Air using Visual Studio Code.
I've been developing ASP.NET Core website for 1 year. Now my website runs on production. It is easy to customize, fast and reliable platform. Microsoft makes a lot of efforts to add new features to it. So I definitely advise to use ASP.NET Core.
Third party support bugs me for .Net Core but otherwise it has been amazing. For example, I had some problems using it with Firebase and other than SignalR there doesn't seem to be another websockets library present.

I mainly develop on Ubuntu using VS Code & Docker.

I am missing Rails feature in ASP.NET Core.
Using it for two days now on OSX for a client so I don't have much experience with it. First impressions are ok, the documentation could be better and it's not very googleable as you get a lot of irrelevant hits from normal .NET, MS really should have more creativity when it comes to naming. Problems I've hit which I wouldn't expect to hit in a more mature framework:

* Running EF Core migrations against postgres on startup. I wasn't able to google a solution to this. I hacked around this by deploying an init container with a migrate.sql script but I expect that'll bring me problems later on.

* Let's Encrypt. Found an archived package on GitHub, I expected more maturity.

* Not very easy to ascertain the state of the setup, things need to be registered in a certain order for them to work (UseDefaultFiles & UseStaticFiles f.i.). This would be made easier by me having more experience with the stack or better docs, still a waste of time.

You can use FluentMigrator package for database migration. We have used it and it is pretty solid.

https://github.com/fluentmigrator/fluentmigrator/issues

I am curious about your encrytion scenario and why did .Net core fall short.

Thanks for the tip, does FluentMigrator require me to duplicate the table structure in it's DSL or does it have a way to pick up EF Core tables & detect changes?

Re encryption, I was looking for a way to do automatic TLS via https://letsencrypt.org/. Closest I could find was https://github.com/natemcmaster/LetsEncrypt which is archived.

Unfortunately it does not detect DSL changes automatically so yes you will have to copy changes.
What's the common use-case scenario for migration handling in the C# world? I've seen a lot of people doing checks on application startup: Do I have pending migrations? If so, run them. In the Ruby world, checking and running migrations is usually part of the deploy routine, not application startup, and are usually handled by a separate CLI command.
> Not very easy to ascertain the state of the setup, things need to be registered in a certain order for them to work (UseDefaultFiles & UseStaticFiles f.i.).

This point drives me mad. Only after running into errors and reading SO you discover some methods should be called before other. Given how many there is, it's difficult to know if the whole order is done right.

To take the best that it offers, don't forget to use asynchronous calls from the top to the bottom of your code.
Right, it determines ability to scale. For instance, time to time I had a timeout error while connecting to Redis even on low load. After rewriting to async-await the issue has gone.
We run the core of our order system on dotnet core, including (somewhat) micro-service architecture behind the scenes. Build on primarily windows desktops, and hosted on Linux containers. Works well for us; there are a few things we needed to roll ourselves, but by and large it works out of the box.
Are there any open source projects that are representing all features, like an admin panel with an API? As someone coming from Java and Rails, I can learn it with just reading the code.
You can check the tutorials here, https://www.asp.net/
Tell me if I’m wrong but examples are fine if I’m building Hello World. I expect an example with at least 10 classes with full featured login. :)
(comment deleted)
I'm running it in production on pretty large website for about 6 months now, no issues so far. Performs very fast as well.

Also, I develop on MacOS using VS Code most of the time.

One cold harsh truth is that Asp.net core is nowhere close to node, python or django when it comes to libaries.

It's growing but not that fast.

C# is very verbose compared to Ruby. You'll find it hard to get Rails level of productivity with Asp.net core.

Why? Because there is no sidekick, actionmailer, or asset piplining, turbolinks.

Stuff like, "has many, through" (Rails) relationship isn't supported in entity framework. If you plan to use postgres, you'll run into many issues.

You end up dealing with ugly DbContext for setting up basic models. And DbSets to enable tables for your models. All this ugly stuff is thrown in your face.

There are no tutorials on how to add Vuejs or React to your asp.net core project.

Postgres is simply treated as "not important" and you are expected to use mssql.

PostGres + Entity Framework Core is mostly a hack. You run into soo many issues that you'll be forced to leave Postgres and go for mssql.

Need image processing libaries? Good luck with that. There is simply no support.

The only thing you've going for you is, static typing and cool IDE support.

I tried asp.net core for several months and went back to Rails.

Lookup ActiveMerchant and how many payment gateways it support, there is nothing like that in Asp.net core.

Don't get me wrong everything is possible in asp.net core but you'll have to hack together your own solution, there is no standard way of doing things like there is in Rails.

There is a very good reference project: Discource if you want to see the potential of Rails.

Where can i find reference project for asp.net core? There are no good books either.

Only tutorials available teach basic stuff like middleware, rest api without authentication.

Heck all that can be done in Flask in 10 lines.

I’ll be blunt, you don’t know how to use .NET core and you never learned, despite your claimed “several months” of use.

> There are no tutorials on how to add Vuejs or React to your asp.net core project.

This is a remarkable complaint to make. There are literally template starter projects for react/angular when you go to file -> new project. If you choose not to use a starter template, adding your own frontend is trivial: place the built frontend in wwwroot and have an MVC endpoint that returns index.html. I’m not sure how this could be any easier, and it makes me wonder if you ever used .NET core at all.

> Postgres is simply treated as "not important" and you are expected to use mssql. PostGres + Entity Framework Core is mostly a hack. You run into soo many issues that you'll be forced to leave Postgres and go for mssql.

This is simply false. I have used Postgres with .NET core extensively and have never been forced to fall back on SQL server. Exactly what are these serious issues?

> Only tutorials available teach basic stuff like middleware, rest api without authentication.

Are you complaining about setting up authentication? It is easy to add JWT support in startup.cs and then secure endpoints via attributes.

> You end up dealing with ugly DbContext for setting up basic models. And DbSets to enable tables for your models. All this ugly stuff is thrown in your face.

What’s ugly about it? The DbContext represents a particular database connection and a DbSet represents an entity within that database. That’s an entirely rational way to represent the data layer.

> Need image processing libaries? Good luck with that. There is simply no support.

Another remarkable complaint to make. Nothing apart from OpenCV, ImageSharp, the native System.Drawing package, and this entire list of options: https://blogs.msdn.microsoft.com/dotnet/2017/01/19/net-core-...

You should really stop making claims about .NET core that are demonstrably false.

It is already for a year or so. We have not met any limitations (for our use cases) there.
I also use asp.net core both for personal project and company product. It works great especially with f# and giraffe. But in company we use oracle, the devart.data.oracle.efcore is not very good, actually a little bad.
The whole environment handling bothers me, specially when working with containers. Why can't we have something normal like a .env?
There's a couple dotenv nuget packages...

    using DotEnv = dotenv.net.DotEnv;
But I wish the usage for the default load scenario was better. Here's how I'm using it.

        public static void Init()
        {
            var levelsToCheck = 4;
            var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

            for (; currentDirectory != null && levelsToCheck > 0; levelsToCheck--, currentDirectory = currentDirectory.Parent)
            {
                foreach (var fi in currentDirectory.GetFiles(".env", SearchOption.TopDirectoryOnly))
                {
                    DotEnv.Config(false, fi.FullName);
                    return; // found .env file
                }
            };
        }