Hosting Blazor PWA application on IIS

Install the .NET Core Hosting Bundle Download .NET Core Hosting Bundle Download and install the bundle Restart the system. Publish app Publish an app means to produce a compiled app that can be hosted by a server Right click server project then select publish select folder option select location then click finish click publish Deploy app Deploy an app means to move the published app to a hosting system. copy the publish folder into IIS system’s local folder....

December 30, 2021 · 2 min · 243 words · M.Kumaran

PWA application using Blazor

Create a new Blazor PWA application In the create new project screen, select Blazor WebAssembly App give project name and location Select Progressive web application, ASP.NET core hosted option. Once project created it will be like the below Run the application Create notification screen add below code into BlazorPWA\Client\Shared\NavMenu.razor <div class="nav-item px-3"> <NavLink class="nav-link" href="notification"> <span class="oi oi-list-rich" aria-hidden="true"></span> Notification </NavLink> </div> it should be like below after adding that above code....

December 25, 2021 · 5 min · 999 words · M.Kumaran

How to use ActiveMQ in C#

Two versions of ActiveMQ ActiveMQ 5 “Classic” ActiveMQ Artemis Pre-Installation Java Runtime Environment (JRE) is needed Download download ActiveMq from https://activemq.apache.org/ Download link https://activemq.apache.org/components/classic/download/ Extract the files into a directory Start Run activemq start command to start the server C:\....\apache-activemq-5.16.0\bin> activemq start ActiveMQ will start a webserver which is displayed on the screen open the below link in browser, you will be asked to enter password, use the below. http://127.0.0.1:8161/admin/...

January 23, 2021 · 3 min · 633 words · M.Kumaran

How to use Kafka as a load balancer for a topic

This is continuation of my Kafka series. Please read my previous article. Running multiple Kafka consumer with one producer in C# To consume a topic from multiple consumer we need to create that much partition for a topic. for example: If we need 3 consumers to consume a topic as a load balancer then we have to create minimum 3 partition for that topic. Create Admin project to create partition Create a new Admin project, add a button then include below program....

December 23, 2019 · 4 min · 775 words · M.Kumaran

How to use Apache kafka in C#

In this article I will explain how to use kafka in C#. Ensure that you already installed kafka for windows else check my previous article Install Apache Kafka in Windows 10 We are going to use Confluent Kafka library. Setting up Projects in visual studio Create an empty project in .NET Delete empty project and keep only the solution Add new project Create new Kafka producer project Add NuGet packages Right click project –> Manage NuGet packages...

December 22, 2019 · 4 min · 713 words · M.Kumaran

Install packages from myget.org in Visual Studio 2015

By default Visual Studio supports NuGet package manager. Here we will see how to use myget.org package manager in Visual Studio. Open Package Manager settings Tools –> NuGet Package Manager –> Package Manager Settings NuGet package manager setting in visual studio menu Settings screen NuGet settings screen in VisualStudio select package sources add a new package source select the newly added package source give a name add the package URL. Package provider gives this URL....

January 6, 2019 · 1 min · 116 words · M.Kumaran

int x=5; x += x++ + ++x; (C#)

I had this question as my WhatsApp status and got interesting answers from friends. I will explain the answer here. increment and decrement operators are done differently in C# and C One thing that you have to remember is, the way C# does it is different than how C does it. Many people reason as though C# and C are the same language; they are not. here is the great explanation about c# pre and post increment operators....

January 4, 2019 · 1 min · 183 words · M.Kumaran

Asynchronous Programming in c# using async await

async await keyword in c# with simple example. async await – basic example XAML <Window x:Class="AsyncAwait.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="async/await - mkumaran.net" Height="255" Width="331"> <StackPanel> <ListBox Name="lstBox" Height="200"/> <Button Name="btn" Content="Click" Click="btn_Click"/> </StackPanel> </Window> C# using System.Threading; using System.Threading.Tasks; using System.Windows; namespace AsyncAwait { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void btn_Click(object sender, RoutedEventArgs e) { lstBox.Items.Add("Click()"); Process1(); lstBox.Items.Add("Click() - completed"); } private async void Process1() { lstBox....

January 3, 2019 · 2 min · 333 words · M.Kumaran

Avoid multiple mouse move events in C#

in windows/wpf application, mouse move event is triggered multiple time. We will see how to avoid multiple mouse move events. if we want to do some time consuming task in mouse move event, that will affect the performance. Here we will see how to avoid that using timer. In the below logic, mouse move event will be triggered once the mouse move stopped. XAML <Window x:Class="MouseMoveAvoidMultipleEvents.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Border Name="brd" Background="LightBlue" MouseMove="brd_MouseMove" > </Border> </Window> C# using System; using System....

January 2, 2019 · 1 min · 153 words · M.Kumaran