Here are 5 simple tips to best work with HttpClient:
- HttpClient should be long-lived
- Prefer creating one with IHttpClientFactory
- Use named clients for configurability
- Use typed clients for configurability + strong typing
- Avoid using typed clients in Singleton services
@hanif2253 I decided to give the solution with Scaffolding Identity
from VisualStudio a try. I want to use cookie authentication. So basically letting the user go to a Razor Page login before going to the actual SPA.
Hey friends, I need some help to cover my weakest spot:
Handling authentication and user content 😱
I've seen a lot of resources about how to authenticate with provider X.
But... what next?
How can I architect my application (from FE to DB) to handle private content?
Working on something new today
An app to automate setting up VM servers and deployments for ASP.NET and Blazor apps
Using SSH.NET library I can run bash scripts & commands to automate everything
$5 hosting with no painful setup and auto deploys
And this is what is deeply wrong with our industry - choosing tech stack "a priori" is equally ridiculous as being a doctor prescribing medicine to a patient who yet has to enter the office.
.NET devs, how are you storing user uploaded files in your apps?
I've used services like Imagekit and also stored uploaded files on the server in the past.
What other services or techniques are out there for storing user uploaded files?
I've been following #MicrosoftBuild and #MicrosoftIgnite for years.
I still haven't understood how to use Backpack and Schedule.
What the heck is the Backpack?
Also, why there is no timezone indication? Are those hours in CEST? 😶
.NET devs, is there a big difference between the different test projects (NUnit, XUnit, MSTest)?
I've always defaulted to MSTest projects. I know very little about the others.
Here are 4 things I set up on every new .NET project:
- Logging (Serilog)
- Docker-compose
- StyleCop + SonarAnalyzer
- Coding conventions (.editorconfig)
Everything is easier after that.
And I can make sure the team has a consistent development experience.
@hanif2253 If you're a beginner in .NET there are better ways to spend your time than learning about Microservices.
Having said that, here are some interesting repos:
- Microservices: github.com/dotnet-archite…
- Modular Monolith: github.com/kgrzybek/modul…
If you want to learn Software Architecture patterns, here's my approach.
Do these 4 things:
- Pick a Software Architecture
- Research for a few hours (or days)
- Create a simple project applying what you just learned
- Repeat this process with a different architectural pattern
.NET devs, what ORM or library do you use to query your data?
I've never really tried anything besides Entity Framework. Curious about other solutions.