X

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 in server-side Blazor applications

Preview 6 version of .NET Core is released and one interesting new feature is authentication and authorization for server-side Blazor applications. This blog post goes through work currently done and shows how authentication works with server-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.

Building Blazor shared pager component

I have already implemented and then blogged about Blazor pager component and shared Blazor components. This post gathers my previous works and demonstrates how to build Blazor shared pager component we can use in multiple projects.

Building Blazor shared components

Blazor has experimental support for shared components. Developers can build application agnostic Blazor components and when packed to Blazor shared components library these components can be shared between Blazor applications. This blog post shows how to build shared Blazor components.

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.

View component or tag helper?

Suppose you are working on ASP.NET Core web application. To avoid views and layouts grow massive you plan to separate some parts of these to independent components. This way you don’t repeat code you wrote once. You find view components and tag helpers. Which one to use?

gzip and cache control on Azure Blob Storage

Hosting WordPress site on Azure virtual machines means keeping away the loads we can serve from cheaper services. Same time we still want to keep site optimized so pages load fast. This blog post shows how to use gzip compression and cache control headers on Azure blob storage.