Using Authorizing template of AuthorizeView in client-side Blazor applications
After blogging about authentication in server-side Blazor applications and discovering AuthorizationView component I was eager to find out how to use third authentication state Authorizing that is not available for server-side Blazor applications. This blog shows how AuthorizeView and Authorizing state work in client-side Blazor applications.
Authentication failed because the remote party has closed the transport stream
One beautiful day I found the following exception from application error logs: “Authentication failed because the remote party has closed the transport stream exception” and one of our integrations was down. The problem occured only in ASP.NET MVC application. Background services using same external service were not affected. Here’s the solution.
HttpClient: How to remove charset from Content-Type header
I was writing client library for one online service and faced situation where I had to remove charset definition from Content-Type header. It was like content type is application/json or response is 415 “Unsupported media type”. I was using HttpClient class to communicate with service and without additional efforts charset doesn’t go away. Here is how I got charset definition away from Content-Type header.
C# 8: Default implementations in interfaces
C# 8.0 will introduce new language feature – default implementations of interface members. It means that we can define body to interface member and implementing class that doesn’t implement given interface member will use default one from interface itself. Here’s my deep-dive and analyzis to default implementions of interfaces.
Tag helper syntax for view components
Calling view components in ASP.NET Core views may lead to long and ugly code lines containing generic type parameter of view component and anonymous type for InvokeAsync() method parameters. Something my readers have been interested in has been here for long time – tag helper syntax for view components.