Home DotNetNews № 9
Post
Cancel

DotNetNews № 9

Dotnet docker image with app or smallest docker image with self-contained app

Since Dot Net core 3 you can put all framework-dependencies to the release package and try to run an app on a system that has no installed .Net at all. And even more: you can ask dotnet to remove useless dlls during the build release package. That’s makes desktop app distribution simpler. But what about our setup: web app/API running on docker with many docker containers on the same host? Here is the answer: https://andrewlock.net/should-i-use-self-contained-or-framework-dependent-publishing-in-docker-images/

What do you think about approaches? Or you can suggest a better approach?

Scott Hanselman’s 2021 Ultimate Developer and Power Users Tool List for Windows

From time to time he makes a list of useful apps he uses. Maybe it will help you to make your dev life easier! But not all tools are available on our laptops due to corporate policies :(

https://www.hanselman.com/blog/scott-hanselmans-2021-ultimate-developer-and-power-users-tool-list-for-windows

What are your favorite tools?

How to upload a file efficiently?

I like articles about performance because it’s not just to solve the problem. It solving the problem with efficiency in mind. Sometimes all of the approaches have the same performance, but sometimes it has significant differences. It’s just nice to know how to do it better :)

https://josef.codes/efficient-file-uploads-with-dotnet/

Maybe do you know how to upload better?

Released: Microsoft.Data.SqlClient 2.1.1

“Woowwww! Sooo great news!” - may you say sarcastically. It’s a regular update, so is this the news, hah? I’ll tell you a story about hangfire. Since we need to run jobs in the background we decided to use hangfire, because it easy to use and well-known by some of my teammates. We have carefully tested it on IO for several days and it works fine! So we rollout it on production, test it, it works fine. But the data stops uploads at the end of the day. The system was not working. What’s going on!??? The short investigation shows that something wrong with hangfire, jobs are not starting. We spent a lot of time to manage the problem. Useless. We switch to Quartz.Net(big pain in the ass if you don’t know how to do it right). And switch back to hangfire. But it still stuck after 6-24 hours after deployment. The significant amount of logging locates the problem: we query the data from MS-SQL and the operation freezes forever. Even a cancellation token does not interrupt the query. Can you guess what’s going wrong there? We don’t :( One day I got the news about the new version of MS-SQL client, that contains fixes for Kerberos and TCP connections on a Unix environment. Seems like those problems can appear on our project. After the update, the service is working without any problems for four days. Why do we not include the library on the first days of our investigations? Because the service is working fine a week on IO without any problem, so we focused on environment-dependent differences.

Microsoft.Data.SqlClient 2.1.1 release notes: https://techcommunity.microsoft.com/t5/sql-server/released-microsoft-data-sqlclient-2-1-1/ba-p/2003125?WT.mc_id=DOP-MVP-4025064

This post is licensed under CC BY 4.0 by the author.