<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Blog posts RSS Feed</title><description>Abhith Rajan is a Dubai-based full-stack software engineer — .NET, TypeScript and Azure — shipping since 2012. Notes, snippets and curated links on building and running software.</description><link>https://www.abhith.net/</link><language>en</language><image><url>https://www.abhith.net/img/site/brand/icon.png</url><title>Blog posts RSS Feed</title><link>https://www.abhith.net</link></image><item><title>Cost Optimization: Auto Shutdown and Startup of Tagged VMs with Azure Automation</title><link>https://www.abhith.net/blog/cost-optimization-auto-shutdown-and-startup-of-tagged-vms-with-azure-automation/</link><guid isPermaLink="true">https://www.abhith.net/blog/cost-optimization-auto-shutdown-and-startup-of-tagged-vms-with-azure-automation/</guid><description>Unlock cost savings in Azure environments through automated VM shutdown and startup. Implement Azure Automation to optimize resource management and cut unnecessary expenses</description><pubDate>Tue, 30 May 2023 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;In today’s cloud computing era, optimizing costs has become crucial for effective resource management. One area where organizations can achieve significant cost savings is by automating the shutdown and startup processes of virtual machines (VMs) in their test environments. Microsoft Azure offers various solutions to help accomplish this goal, and one powerful approach is through Azure Automation.&lt;/p&gt;
&lt;h2 id=&quot;the-significance-of-cost-optimization&quot;&gt;The Significance of Cost Optimization&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-significance-of-cost-optimization&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Test environments play a vital role in software development and testing processes. However, these environments often remain idle during non-working hours, such as nights and weekends. Continuously running VMs during these periods can lead to unnecessary expenses. By implementing an automated solution that shuts down and starts up VMs based on predefined schedules, organizations can save a substantial amount of money.&lt;/p&gt;
&lt;h2 id=&quot;azure-automation-streamlining-cost-optimization&quot;&gt;Azure Automation: Streamlining Cost Optimization&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#azure-automation-streamlining-cost-optimization&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Azure Automation is a cloud-based service that enables you to automate the management of your Azure resources. It offers a wide range of capabilities for process automation, configuration management, and update management. Through the use of &lt;strong&gt;Runbooks&lt;/strong&gt;, you can schedule the shutdown and startup of VMs based on specific criteria, optimizing costs in test environments.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/runbooks.ARq5CSLg_Z151O3o.webp&quot; alt=&quot;Runbooks&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1253&quot; height=&quot;463&quot;&gt;&lt;figcaption&gt;Runbooks&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;implementing-vm-shutdown-with-azure-automation&quot;&gt;Implementing VM Shutdown with Azure Automation&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#implementing-vm-shutdown-with-azure-automation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/stop.CAw0oehR_1yerXb.webp&quot; alt=&quot;Stop VM Runbook&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1863&quot; height=&quot;800&quot;&gt;&lt;figcaption&gt;Stop VM Runbook&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;To implement the VM shutdown process, you can utilize PowerShell scripts within an Azure Automation runbook. The following code snippet illustrates how to shut down VMs during weekdays (Monday to Friday) from 10 PM to 6 AM:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Get the current time in the time zone of your choice&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;TimeZone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;System.TimeZoneInfo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]::FindSystemTimeZoneById(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Arabian Standard Time&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;System.TimeZoneInfo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]::ConvertTimeFromUtc([&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]::UtcNow&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;TimeZone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Connect to Azure Account using Managed Identity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Conn&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;Connect-AzAccount&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Identity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Weekday Shutdown (Mon-Fri, 10pm-6am)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; ((&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.DayOfWeek&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-ge&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Monday&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.DayOfWeek&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-le&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Friday&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;HH:mm&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-ge&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;22:00&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-or&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;HH:mm&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-lt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;06:00&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VMs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;Get-AzResource&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Tag &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{ &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Availability&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Available 6am-10pm Mon-Fri, Unavailable 10pm-6am Mon-Fri and all day Sat-Sun&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;ResourceType &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Microsoft.Compute/virtualMachines&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VMs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;Stop-AzVM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;ResourceGroupName &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VM.ResourceGroupName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Name &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VM.Name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Force&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;$TimeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById(&amp;quot;Arabian Standard Time&amp;quot;)$ScheduledTime = [System.TimeZoneInfo]::ConvertTimeFromUtc([DateTime]::UtcNow, $TimeZone)$Conn = Connect-AzAccount -Identityif (($ScheduledTime.DayOfWeek -ge &amp;quot;Monday&amp;quot;) -and ($ScheduledTime.DayOfWeek -le &amp;quot;Friday&amp;quot;) -and ($ScheduledTime.ToString(&amp;quot;HH:mm&amp;quot;) -ge &amp;quot;22:00&amp;quot;) -or ($ScheduledTime.ToString(&amp;quot;HH:mm&amp;quot;) -lt &amp;quot;06:00&amp;quot;)) {   $VMs = Get-AzResource -Tag @{ Availability = &amp;quot;Available 6am-10pm Mon-Fri, Unavailable 10pm-6am Mon-Fri and all day Sat-Sun&amp;quot; } -ResourceType &amp;quot;Microsoft.Compute/virtualMachines&amp;quot;   foreach ($VM in $VMs) {       Stop-AzVM -ResourceGroupName $VM.ResourceGroupName -Name $VM.Name -Force   }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This code snippet retrieves the current time in the specified time zone, connects to your Azure account using Managed Identity, and identifies the VMs based on a specified tag “Availability = Available 6am-10pm Mon-Fri, Unavailable 10pm-6am Mon-Fri and all day Sat-Sun”. It checks if the current time falls within the desired shutdown window and proceeds to stop each VM using the Stop-AzVM command.&lt;/p&gt;
&lt;p&gt;Schedule for VM Shutdown:&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/stop-schedule.rbw22E3p_Z12PDbs.webp&quot; alt=&quot;Stop VM Schedule&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1863&quot; height=&quot;849&quot;&gt;&lt;figcaption&gt;Stop VM Schedule&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;implementing-vm-startup-with-azure-automation&quot;&gt;Implementing VM Startup with Azure Automation&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#implementing-vm-startup-with-azure-automation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Similarly, you can implement the VM startup process using another PowerShell script within a separate Azure Automation runbook. The script can be scheduled to run during working hours or any other predefined schedule. The code snippet below demonstrates how to start VMs during weekdays:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Get the current time in the time zone of your choice&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;TimeZone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;System.TimeZoneInfo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]::FindSystemTimeZoneById(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Arabian Standard Time&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;System.TimeZoneInfo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]::ConvertTimeFromUtc([&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]::UtcNow&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;TimeZone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Connect to Azure Account using Managed Identity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Conn&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;Connect-AzAccount&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Identity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Weekday Start (Mon-Fri, 6am-10pm)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; ((&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.DayOfWeek&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-ge&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Monday&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.DayOfWeek&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-le&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Friday&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;HH:mm&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-ge&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;06:00&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ScheduledTime.ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;HH:mm&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-lt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;22:00&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VMs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;Get-AzResource&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Tag &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{ &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Availability&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Available 6am-10pm Mon-Fri, Unavailable 10pm-6am Mon-Fri and all day Sat-Sun&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;ResourceType &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Microsoft.Compute/virtualMachines&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VMs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;Start-AzVM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;ResourceGroupName &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VM.ResourceGroupName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Name &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;VM.Name&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;$TimeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById(&amp;quot;Arabian Standard Time&amp;quot;)$ScheduledTime = [System.TimeZoneInfo]::ConvertTimeFromUtc([DateTime]::UtcNow, $TimeZone)$Conn = Connect-AzAccount -Identityif (($ScheduledTime.DayOfWeek -ge &amp;quot;Monday&amp;quot;) -and ($ScheduledTime.DayOfWeek -le &amp;quot;Friday&amp;quot;) -and ($ScheduledTime.ToString(&amp;quot;HH:mm&amp;quot;) -ge &amp;quot;06:00&amp;quot;) -and ($ScheduledTime.ToString(&amp;quot;HH:mm&amp;quot;) -lt &amp;quot;22:00&amp;quot;)) {   $VMs = Get-AzResource -Tag @{ Availability = &amp;quot;Available 6am-10pm Mon-Fri, Unavailable 10pm-6am Mon-Fri and all day Sat-Sun&amp;quot; } -ResourceType &amp;quot;Microsoft.Compute/virtualMachines&amp;quot;   foreach ($VM in $VMs) {       Start-AzVM -ResourceGroupName $VM.ResourceGroupName -Name $VM.Name   }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The above code snippet retrieves the current time, connects to your Azure account using Managed Identity, and starts VMs based on the specified criteria. It identifies VMs tagged with “Availability = Available 6am-10pm Mon-Fri, Unavailable 10pm-6am Mon-Fri and all day Sat-Sun” and initiates the startup process using the Start-AzVM command.&lt;/p&gt;
&lt;p&gt;Schedule for VM Startup:&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/start-schedule.C-wIIEOF_Z2pIRc.webp&quot; alt=&quot;Start VM Schedule&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;588&quot; height=&quot;851&quot;&gt;&lt;figcaption&gt;Start VM Schedule&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;additional-considerations&quot;&gt;Additional Considerations&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-considerations&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When implementing Azure Automation for VM shutdown and startup, keep the following points in mind:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an Azure Automation account to host your runbooks.&lt;/li&gt;
&lt;li&gt;Enable Managed Identity for Azure Automation to securely connect to your Azure resources.
 &lt;img src=&quot;https://www.abhith.net/_astro/identity.DAVztfwM_Z2uV2bK.webp&quot; alt=&quot;Managed identity enabled&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;732&quot; height=&quot;565&quot;&gt;&lt;/li&gt;
&lt;li&gt;Grant the necessary permissions to the Managed Identity. In this case, assigning the &lt;strong&gt;Virtual Machine Contributor&lt;/strong&gt; role at the resource group level is sufficient for performing the shutdown and startup actions.
 &lt;img src=&quot;https://www.abhith.net/_astro/role-assignments.DeATOAgU_Z1Yuq7u.webp&quot; alt=&quot;Role assignments&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1566&quot; height=&quot;358&quot;&gt;&lt;/li&gt;
&lt;li&gt;Ensure relevant VMs are appropriately tagged for efficient automation.
 &lt;img src=&quot;https://www.abhith.net/_astro/tagged-vm.CUlnjZ65_Z1wsPjB.webp&quot; alt=&quot;Tagged VM&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1345&quot; height=&quot;415&quot;&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By following these guidelines and leveraging Azure Automation, you can effectively optimize costs by automating the shutdown and startup of tagged VMs in your test environments. This approach ensures that VMs are active only when needed,thereby reducing unnecessary expenses. Additionally, it streamlines resource management and ensures that resources are available and ready for use during working hours.&lt;/p&gt;
&lt;p&gt;Moreover, Azure Automation provides flexibility in scheduling the shutdown and startup processes based on specific criteria. You can customize the schedules according to your organization’s requirements, taking into account factors such as different time zones or varying working hours across teams.&lt;/p&gt;
&lt;p&gt;Implementing VM shutdown and startup through Azure Automation offers several benefits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cost savings&lt;/strong&gt;: By automatically shutting down VMs during non-working hours, organizations can significantly reduce costs associated with running idle resources. This optimization can lead to substantial savings over time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Resource availability&lt;/strong&gt;: VMs can be automatically started up before working hours, ensuring that the necessary resources are available when the team begins their tasks. This eliminates delays caused by manual startup processes and improves productivity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Scalability and agility&lt;/strong&gt;: Azure Automation allows for easy scaling of the solution to accommodate changing needs. As your organization grows or experiences fluctuations in demand, you can adjust the automation processes accordingly, ensuring efficient resource utilization.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Centralized management&lt;/strong&gt;: Azure Automation provides a centralized platform for managing and monitoring the automated shutdown and startup processes. You can view and track the status of the runbooks, monitor resource utilization, and make adjustments as needed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Compliance and security&lt;/strong&gt;: By leveraging Managed Identity and assigning the appropriate permissions, Azure Automation ensures secure access to Azure resources without the need for storing credentials within the automation scripts. This improves compliance with security best practices and reduces potential risks.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In conclusion, automating the shutdown and startup processes of tagged VMs using Azure Automation is a powerful solution for cost optimization and resource management in test environments. By implementing predefined schedules and leveraging the flexibility of Azure Automation, organizations can achieve significant cost savings, improve resource availability, and streamline operations.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Remember, cost optimization is an ongoing process, and regularly reviewing and adjusting your automation schedules based on changing requirements can further enhance your cost-saving efforts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you have any questions or need clarification on any part of the post, feel free to leave a comment, and I’ll be glad to assist you.&lt;/p&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Discover the power of Azure Automation for cost optimization in Azure environments. Cut unnecessary expenses, optimize resource management, and efficiently manage tagged VMs with automated VM shutdown and startup. &lt;a href=&quot;https://t.co/bVUXhZ2cwT&quot;&gt;https://t.co/bVUXhZ2cwT&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/Azure?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Azure&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/CostOptimization?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#CostOptimization&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/Automation?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Automation&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1663511639147028480?ref_src=twsrc%5Etfw&quot;&gt;May 30, 2023&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>azure</category><author>Abhith Rajan</author></item><item><title>How We Use Jira Automation</title><link>https://www.abhith.net/blog/how-we-use-jira-automation/</link><guid isPermaLink="true">https://www.abhith.net/blog/how-we-use-jira-automation/</guid><description>Jira automation makes your project management easier by automating so much of the work you already do.</description><pubDate>Sun, 10 Apr 2022 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;We use &lt;a href=&quot;https://www.abhith.net/topics/jira/&quot;&gt;Jira&lt;/a&gt; for our issue/task management at work. As a DevOps guy, one of my favorite features of Jira is Jira automation.&lt;/p&gt;
&lt;p&gt;For automation starters, the good thing is there are many predefined templates available at the &lt;a href=&quot;https://www.atlassian.com/software/jira/automation-template-library?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=how-we-use-jira-automation&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Jira automation template library&lt;/a&gt;, which we can use as a reference to create our own with adaptations as per our needs.&lt;/p&gt;
&lt;p&gt;Before getting into the automation rules which we use, to get a better picture, better to know about our current workflow.&lt;/p&gt;
&lt;h2 id=&quot;workflow&quot;&gt;Workflow&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#workflow&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Our current workflow is,&lt;/p&gt;
&lt;pre class=&quot;mermaid&quot; data-mermaid&gt;flowchart LR
Backlog --&amp;gt; Todo
Todo --&amp;gt; InDev[In Dev]
InDev --&amp;gt; ReadyForQA[Ready for QA]
ReadyForQA --&amp;gt; InTest[In Test]
InTest --&amp;gt; IsQAPassed{Is QA passed?}
IsQAPassed --&amp;gt; |Yes| ReadyToDeploy[Ready to Deploy]
IsQAPassed -. Yes .-&amp;gt; Done
IsQAPassed --&amp;gt; |No| Todo
ReadyToDeploy --&amp;gt; Done&lt;/pre&gt;
&lt;p&gt;And, we configured our Jira to have the following two custom fields for issue types, which are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developer&lt;/li&gt;
&lt;li&gt;Tester&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both of them are of the type &lt;code&gt;User Picker (single user)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This is to retain the developer, and tester information on the issue since the assignee may change during state transition as per the workflow.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/custom-fields.Bf5KiIwm_THLjk.webp&quot; alt=&quot;Custom fields&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1278&quot; height=&quot;811&quot;&gt;&lt;figcaption&gt;Custom fields&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Now, let’s jump into the automation rules which we use. They are,&lt;/p&gt;
&lt;h2 id=&quot;automation-rules&quot;&gt;Automation rules&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#automation-rules&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Auto-assign to whoever created the issue&lt;/li&gt;
&lt;li&gt;Close duplicate issues&lt;/li&gt;
&lt;li&gt;Link issues that are mentioned in the comments&lt;/li&gt;
&lt;li&gt;When a commit is created and the status is ‘To do’ → then transition this issue to ‘In Dev’&lt;/li&gt;
&lt;li&gt;On Pull Request created → comment the details&lt;/li&gt;
&lt;li&gt;On Pull Request merged → comment the details&lt;/li&gt;
&lt;li&gt;Comment on Ready for QA items if not assigned to a QA&lt;/li&gt;
&lt;li&gt;Assign issue back to Developer once Ready To Deploy&lt;/li&gt;
&lt;li&gt;Assign issue back to Developer once Done&lt;/li&gt;
&lt;li&gt;When issue is resolved → comment on related issues&lt;/li&gt;
&lt;li&gt;Label issues as stale that have not had recent interaction&lt;/li&gt;
&lt;/ol&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/automations.eI2d828Q_ZrDb3C.webp&quot; alt=&quot;Automation&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1625&quot; height=&quot;633&quot;&gt;&lt;figcaption&gt;Automation&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;I hope the names are self-explanatory. Now let’s dig into each and will try to explain the use case for each,&lt;/p&gt;
&lt;h3 id=&quot;1-auto-assign-to-whoever-created-the-issue&quot;&gt;1. Auto-assign to whoever created the issue&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#1-auto-assign-to-whoever-created-the-issue&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This is very simple automation. When an issue is created &lt;strong&gt;without an assignee&lt;/strong&gt;, automatically assign it to the person who created it.&lt;/p&gt;
&lt;p&gt;This ensures that someone is always accountable for an issue by making sure it is always assigned to whoever created it.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/auto-assign-to-whoever-created-the-issue-1.CQNFzKgd_LI4DE.webp&quot; alt=&quot;Auto-assign to whoever created the issue&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1326&quot; height=&quot;784&quot;&gt;&lt;figcaption&gt;Auto-assign to whoever created the issue&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And the result will be,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/1-auto-assign-to-whoever-created-the-issue-result.CaVs7yGl_Zv5cbD.webp&quot; alt=&quot;Automation auto assigned to reporter&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;489&quot; height=&quot;232&quot;&gt;&lt;figcaption&gt;Automation auto assigned to reporter&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;There’s a template for the same in the Jira automation template library.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://www.atlassian.com/software/jira/automation-template-library/rules?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=how-we-use-jira-automation#/rule/1381434&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Smart auto-assign&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;2-close-duplicate-issues&quot;&gt;2. Close duplicate issues&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2-close-duplicate-issues&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Sometimes, we have multiple similar issues. We can close the second issue and keep the first issue open just by adding a link to the second issue as,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The second issue &lt;code&gt;duplicates&lt;/code&gt; the first issue.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/close-duplicate-issues-1.CVopig3-_Z1YTKme.webp&quot; alt=&quot;Link issue as duplicates&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;626&quot; height=&quot;69&quot;&gt;&lt;figcaption&gt;Link issue as duplicates&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The automation rule for closing such duplicate is,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/close-duplicate-issues-2.CCWU_Bxx_1CPTzQ.webp&quot; alt=&quot;Trigger - Close duplicate issues&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1315&quot; height=&quot;514&quot;&gt;&lt;figcaption&gt;Trigger - Close duplicate issues&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;That will do,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/2-close-duplicate-issues-result.Dy9_P4y3_ceifb.webp&quot; alt=&quot;Duplicate issue closed by automation&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;527&quot; height=&quot;304&quot;&gt;&lt;figcaption&gt;Duplicate issue closed by automation&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;3-link-issues-that-are-mentioned-in-the-comments&quot;&gt;3. Link issues that are mentioned in the comments&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#3-link-issues-that-are-mentioned-in-the-comments&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This will help us to link issues that are mentioned in the comments. And, along with the automation rule &lt;strong&gt;When issue is resolved → comment on related issues&lt;/strong&gt;, this is a great way of notifying the related issues and the watchers of the same.&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.abhith.net/_astro/link-issues-that-are-mentioned-in-the-comments-1.OD7GLQoi_Zzgpuq.webp&quot; alt=&quot;Trigger - Link issues that are mentioned in the comments&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1316&quot; height=&quot;594&quot;&gt;
 &lt;img src=&quot;https://www.abhith.net/_astro/link-issues-that-are-mentioned-in-the-comments-2.BJFa-6_V_YTNzv.webp&quot; alt=&quot;Check whether any issue mentioned in the comments&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1321&quot; height=&quot;594&quot;&gt;
 &lt;img src=&quot;https://www.abhith.net/_astro/link-issues-that-are-mentioned-in-the-comments-3.pfsb8mcB_Z1EQrNW.webp&quot; alt=&quot;Link the mentioned issue&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1326&quot; height=&quot;596&quot;&gt;&lt;/p&gt;
&lt;p&gt;The result is,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/link-issues-that-are-mentioned-in-the-comments-result.C6nHkdSX_Z1KdLKq.webp&quot; alt=&quot;Automation links the commented issue&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;528&quot; height=&quot;73&quot;&gt;&lt;figcaption&gt;Automation links the commented issue&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;4-when-a-commit-is-created-and-the-status-is-to-do--then-transition-this-issue-to-in-dev&quot;&gt;4. When a commit is created and the status is ‘To do’ → then transition this issue to ‘In Dev’&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#4-when-a-commit-is-created-and-the-status-is-to-do--then-transition-this-issue-to-in-dev&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We already connected our &lt;strong&gt;GitHub&lt;/strong&gt; repos to our JIRA cloud.
And, this automation will help us to transition the issue to ‘In Dev’ when a commit is created in Github.&lt;/p&gt;
&lt;p&gt;You can use the smart commit message to trigger this automation.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://support.atlassian.com/jira-software-cloud/docs/process-issues-with-smart-commits/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=how-we-use-jira-automation&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Process issues with smart commits | Jira Software Cloud | Atlassian Support&lt;/a&gt;&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/when-a-commit-is-created-and-the-status-is-to-do-then-transition-this-issue-to-in-dev-1.Pf5ZS4XC_ZYbh3E.webp&quot; alt=&quot;Trigger - When a commit is created and the status is &apos;To do&apos; → then transition this issue to &apos;In Dev&apos;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1318&quot; height=&quot;548&quot;&gt;&lt;figcaption&gt;Trigger - When a commit is created and the status is &amp;#39;To do&amp;#39; → then transition this issue to &amp;#39;In Dev&amp;#39;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;That’s it, automation will take care of the issue transition,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/when-a-commit-is-created-and-the-status-is-to-do-then-transition-this-issue-to-in-dev-result.DYKpVxNp_9NK0K.webp&quot; alt=&quot;Issue transition&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;503&quot; height=&quot;70&quot;&gt;&lt;figcaption&gt;Issue transition&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;5-on-pull-request-created--comment-the-details&quot;&gt;5. On Pull Request created → comment the details&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#5-on-pull-request-created--comment-the-details&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This is to comment on the issue about the details of the pull request so the watchers are informed that there’s some progress on the work item.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/on-pull-request-created-comment-the-details-1.DeDkWwwe_ZYeqk2.webp&quot; alt=&quot;Comment - On Pull Request created → comment the details&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1317&quot; height=&quot;520&quot;&gt;&lt;figcaption&gt;Comment - On Pull Request created → comment the details&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Then automation will do,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/on-pull-request-created-comment-the-details-result.Cw21-j2O_2mYe4n.webp&quot; alt=&quot;Comments PR details when PR created&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;894&quot; height=&quot;96&quot;&gt;&lt;figcaption&gt;Comments PR details when PR created&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;6-on-pull-request-merged--comment-the-details&quot;&gt;6. On Pull Request merged → comment the details&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#6-on-pull-request-merged--comment-the-details&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Similar to &lt;strong&gt;On Pull Request created → comment the details&lt;/strong&gt;, this is to comment the details of the pull request on the issue so the watchers are informed that there is more progress on the work item.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/on-pull-request-merged-comment-the-details-1.CFri-dI7_Z2r6b3y.webp&quot; alt=&quot;Comment - On Pull Request merged → comment the details&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1318&quot; height=&quot;531&quot;&gt;&lt;figcaption&gt;Comment - On Pull Request merged → comment the details&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Then automation will do,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/on-pull-request-merged-comment-the-details-result.BpQVmkDy_Z1516cV.webp&quot; alt=&quot;Comments PR details when PR merged&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;875&quot; height=&quot;91&quot;&gt;&lt;figcaption&gt;Comments PR details when PR merged&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;7-comment-on-ready-for-qa-items-if-not-assigned-to-a-qa&quot;&gt;7. Comment on Ready for QA items if not assigned to a QA&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#7-comment-on-ready-for-qa-items-if-not-assigned-to-a-qa&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As per our workflow, the dev should assign the task to a QA person when the task is ready for QA.
But, if the dev doesn’t assign the task to a QA person, then automation comments on the issue to alert the dev person.&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.abhith.net/_astro/comment-on-ready-for-qa-items-if-not-assigned-to-a-qa-1.CBDzZq0u_1xgXHD.webp&quot; alt=&quot;Scheduled trigger&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1305&quot; height=&quot;604&quot;&gt;
 &lt;img src=&quot;https://www.abhith.net/_astro/comment-on-ready-for-qa-items-if-not-assigned-to-a-qa-2.BSFmSqj8_Z13UCMD.webp&quot; alt=&quot;Comment&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1320&quot; height=&quot;513&quot;&gt;&lt;/p&gt;
&lt;p&gt;That’s it, automation will notify the developer in case they forgot to assign the task to a QA person.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/comment-on-ready-for-qa-items-if-not-assigned-to-a-qa-result.3w9Ea9OV_Z1PRey6.webp&quot; alt=&quot;Automation comment&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;502&quot; height=&quot;98&quot;&gt;&lt;figcaption&gt;Automation comment&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;8-assign-issue-back-to-developer-once-ready-to-deploy&quot;&gt;8. Assign issue back to Developer once Ready To Deploy&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#8-assign-issue-back-to-developer-once-ready-to-deploy&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Once the QA passed, the QA person should assign the task back to the developer of that work item along with changing the status to &lt;strong&gt;Ready to Deploy&lt;/strong&gt;. But, we observed that most time the QA person forgets to assign the task back to the dev.
To avoid this, we are using this automation rule to assign the task back to the dev once the task is ready to deploy.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/assign-issue-back-to-developer-once-ready-to-deploy-1.vNgROBHv_Z33qqJ.webp&quot; alt=&quot;Change assignee&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1331&quot; height=&quot;728&quot;&gt;&lt;figcaption&gt;Change assignee&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Now automation will take care of the assignee switching,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/assign-issue-back-to-developer-once-ready-to-deploy-result.D-c7UCxo_nNh91.webp&quot; alt=&quot;Assignee changed&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;494&quot; height=&quot;171&quot;&gt;&lt;figcaption&gt;Assignee changed&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;9-assign-issue-back-to-developer-once-done&quot;&gt;9. Assign issue back to Developer once Done&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#9-assign-issue-back-to-developer-once-done&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This is similar to &lt;strong&gt;Assign issue back to Developer once Ready To Deploy&lt;/strong&gt;, but this is to assign the task back to the dev once the task is done.&lt;/p&gt;
&lt;p&gt;That is because, once QA passed, QA can either mark it as &lt;strong&gt;Done&lt;/strong&gt; or &lt;strong&gt;Ready to Deploy&lt;/strong&gt;.
 &lt;img src=&quot;https://www.abhith.net/_astro/assign-issue-back-to-developer-once-done-1.lp8L6aY__Z2f614j.webp&quot; alt=&quot;Condition&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1325&quot; height=&quot;731&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;10-when-issue-is-resolved--comment-on-related-issues&quot;&gt;10. When issue is resolved → comment on related issues&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#10-when-issue-is-resolved--comment-on-related-issues&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As I mentioned in the automation rule &lt;strong&gt;3. Link issues that are mentioned in the comments&lt;/strong&gt;, this is a great way of notifying the related issues and the watchers of the same.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/when-issue-is-resolved-comment-on-related-issues-1.tMxrIDFi_1ypT2c.webp&quot; alt=&quot;Comment on related issues&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1360&quot; height=&quot;772&quot;&gt;&lt;figcaption&gt;Comment on related issues&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This rule does,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/10-when-issue-is-resolved-comment-on-related-issues-result.Dzux0_Um_USqoQ.webp&quot; alt=&quot;Commented on related issue&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;772&quot; height=&quot;251&quot;&gt;&lt;figcaption&gt;Commented on related issue&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;11-label-issues-as-stale-that-have-not-had-recent-interaction&quot;&gt;11. Label issues as stale that have not had recent interaction&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#11-label-issues-as-stale-that-have-not-had-recent-interaction&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;After a period of inactivity (now set to 60d), a stale label will be applied to mark an issue with &lt;code&gt;Todo&lt;/code&gt; status as &lt;strong&gt;stale&lt;/strong&gt; and posts a comment to notify contributors that the issue will be closed.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/label-issues-as-stale-that-have-not-had-recent-interaction-1.Dz93etzY_ZO7jxq.webp&quot; alt=&quot;Label issues as stale that have not had recent interaction&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1335&quot; height=&quot;787&quot;&gt;&lt;figcaption&gt;Label issues as stale that have not had recent interaction&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Before adding this rule to the automation, I had around ~250 issues assigned to me in the Backlog. Most of them were created by myself since I have a habit of making notes of all work items in the Jira after any work-related discussions. But all of those were sitting there for so long whereas our priorities were wholly different and some were too old and stale of course. And, we recently started to work based on the backlog items so having a long backlog with stale work items is not a good thing and it was hard to prioritize the work too.&lt;/p&gt;
&lt;p&gt;So, I decided to add this rule to the automation and it labeled the stale issues.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/stale.BLNReTXj_2pLNPn.webp&quot; alt=&quot;Stale issues&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1005&quot; height=&quot;316&quot;&gt;&lt;figcaption&gt;Stale issues&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Then I went around all my stale issues, closed the ones which were not relevant anymore, and the ones which are not stale simply removed the stale label. In the end, I ended up having around ~50 items in the backlog.
So, picking up items for the next sprint was easy and I was able to prioritize the backlog items.&lt;/p&gt;
&lt;h4 id=&quot;is-closing-stale-issues-really-a-good-idea&quot;&gt;Is closing stale issues really a good idea?&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#is-closing-stale-issues-really-a-good-idea&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In any successful software project, there’s always more work to do than people to do it. As more and more work piles up, it becomes paralyzing. Just making decisions about what work should and shouldn’t get done can exhaust all available resources.&lt;/p&gt;
&lt;p&gt;Focusing on issues that are actively affecting humans is an effective method for prioritizing work.&lt;/p&gt;
&lt;p&gt;To some, a robot trying to close stale issues may seem inhospitable or offensive to contributors. But the alternative is to disrespect them by setting false expectations and implicitly ignoring their work. This automation makes it explicit: if work is not progressing, then it’s stale. A comment is all it takes to keep the conversation alive.&lt;/p&gt;
&lt;h2 id=&quot;planned-improvements&quot;&gt;Planned Improvements&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#planned-improvements&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Rule to auto-assign to the tester when transitioned to &lt;strong&gt;Ready for QA&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Rule to auto-assign to the developer when transitioned to &lt;strong&gt;Todo&lt;/strong&gt; from &lt;strong&gt;In Test&lt;/strong&gt; (QA not passed case)&lt;/li&gt;
&lt;li&gt;Close issues that are marked as stale, after a period of inactivity.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;final-thoughts&quot;&gt;Final Thoughts&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#final-thoughts&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The Jira automation helps us to manage the work items more efficiently and we are loving it.
If you have any questions related to any of the Jira automation rules, or if you have any suggestions, please feel free to post them in the comments 👇&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.atlassian.com/software/jira/automation-template-library/most-popular?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=how-we-use-jira-automation&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Most popular Jira automation templates | Atlassian&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;This is how we use Jira Automation.&lt;br&gt; &lt;a href=&quot;https://t.co/uZkdcDGtH2&quot;&gt;https://t.co/uZkdcDGtH2&lt;/a&gt;&lt;br&gt;&lt;br&gt; &lt;a href=&quot;https://x.com/hashtag/jira?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#jira&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/projectmanagement?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#projectmanagement&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1513555118817435657?ref_src=twsrc%5Etfw&quot;&gt;April 11, 2022&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>jira</category><category>project-management</category><author>Abhith Rajan</author></item><item><title>GitHub vs Azure DevOps - For Code</title><link>https://www.abhith.net/blog/github-vs-azure-devops-for-code/</link><guid isPermaLink="true">https://www.abhith.net/blog/github-vs-azure-devops-for-code/</guid><description>Comparing GitHub and Azure DevOps for code management and related features. Hopefully, this post will encourage you to switch to GitHub.</description><pubDate>Tue, 01 Feb 2022 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;I have been using &lt;a href=&quot;https://www.abhith.net/topics/azure-devops/&quot;&gt;Azure DevOps&lt;/a&gt; as well as &lt;a href=&quot;https://www.abhith.net/topics/github/&quot;&gt;GitHub&lt;/a&gt; for many years now.
All open-source stuff is on GitHub (some private repositories too.), and all work stuff is on Azure DevOps.
I love &lt;a href=&quot;https://www.abhith.net/topics/azure-devops/&quot;&gt;Azure DevOps&lt;/a&gt;, but for &lt;strong&gt;code&lt;/strong&gt; management, I prefer using &lt;a href=&quot;https://www.abhith.net/topics/github/&quot;&gt;GitHub&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;Since both are owned by &lt;strong&gt;Microsoft&lt;/strong&gt;, and seeing the recent developments and features all happening on the GitHub side compared to Azure DevOps, my mind is pretty clear on which to choose for the future.
It’s not just me, but many people agree on the same.
Jump to the &lt;a href=&quot;https://www.youtube.com/watch?v=K5aO97x2208&amp;amp;t=2420s&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;40:20&lt;/a&gt; on the below video and hear yourself.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;youtube: https://www.youtube.com/watch?v=K5aO97x2208&amp;amp;start=2420s&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So, I would like to see this change (move all our repo to GitHub) in my organization.
Currently, we use Azure DevOps for both code &amp;amp; CI/CD pipelines.&lt;/p&gt;
&lt;p&gt;Since it is an organization-wide change, I cannot just go and tell my manager about this change.
Instead, I have to present what benefits we are getting through this change.&lt;/p&gt;
&lt;p&gt;For that, I thought of creating an internal presentation and side-by-side this public blog.&lt;/p&gt;
&lt;p&gt;So in this post, I will try to list out things that attract me towards GitHub for code management.&lt;/p&gt;
&lt;h2 id=&quot;dependabot&quot;&gt;Dependabot&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dependabot&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Automated dependency updates built into GitHub.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One of the main attracting factors towards GitHub.
Since we have many projects and tracking all the dependencies manually is not possible at all.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Keep all your packages up to date with Dependabot&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dependabot&lt;/strong&gt;’s automated PRs with updated packages/dependencies help a lot.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/dependabot-prs.DD4_Iy3u_ZKvimT.webp&quot; alt=&quot;Dependabot PRs&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;&lt;figcaption&gt;Dependabot PRs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And the security alerts,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/dependabot-alerts.BliJdlod_1RMK2r.webp&quot; alt=&quot;Dependabot Alerts&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;&lt;figcaption&gt;Dependabot Alerts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;code-scanning&quot;&gt;Code Scanning&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#code-scanning&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://resources.github.com/code-scanning/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Code scanning&lt;/a&gt; is GitHub’s native SAST (Static Application Security Testing) tool, a developer-first approach to SAST that enables vulnerabilities to be found and remediated effortlessly before they reach production.&lt;/p&gt;
&lt;p&gt;Here’s what GitHub code scanning can help you do:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find, triage, and prioritize vulnerabilities in your code.&lt;/li&gt;
&lt;li&gt;See security issues in your pull requests as part of your review process.&lt;/li&gt;
&lt;li&gt;Prevent new vulnerabilities from making it to production.&lt;/li&gt;
&lt;li&gt;Schedule scans for specific days and times, or trigger scans when a specific event occurs in the repository, such as a push.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;a href=&quot;https://codeql.github.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CodeQL&lt;/a&gt; action part of the code scanning features of GitHub is good even though comes at a price (of course free for open source).
And I prefer the &lt;code&gt;security-and-quality&lt;/code&gt; query suite for the &lt;code&gt;CodeQL&lt;/code&gt;.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/code-scanning-alerts.BLmJOJsG_Z2hIDk2.webp&quot; alt=&quot;Code Scanning Alerts&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;&lt;figcaption&gt;Code Scanning Alerts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;marketplace-and-integrations&quot;&gt;Marketplace and integrations&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#marketplace-and-integrations&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Both Azure DevOps and GitHub have many integrations available.
But IMHO, GitHub has a better collection, growing too.&lt;/p&gt;
&lt;h3 id=&quot;jira&quot;&gt;JIRA&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#jira&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We manage our work items through &lt;a href=&quot;https://www.abhith.net/topics/jira/&quot;&gt;Jira&lt;/a&gt;. One of the main things we are missing in Azure DevOps is the Jira integration whereas there’s an official integration available between JIRA and GitHub.&lt;/p&gt;
&lt;p&gt;Linking work items to code have many benefits.&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.abhith.net/_astro/jira-development.DYESIaJ6_VSO3c.webp&quot; alt=&quot;Development links in the Jira issue details&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;
 &lt;img src=&quot;https://www.abhith.net/_astro/jira-branches.Dgefgs2X_GDCR0.webp&quot; alt=&quot;GitHub Branches&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;
 &lt;img src=&quot;https://www.abhith.net/_astro/jira-commits.DIfzjIrB_2pE1rV.webp&quot; alt=&quot;GitHub Commits&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;
 &lt;img src=&quot;https://www.abhith.net/_astro/jira-prs.Ch1iXJWo_Z7L4KO.webp&quot; alt=&quot;GitHub PRs&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;&lt;/p&gt;
&lt;p&gt;GitHub issues, boards all are awesome but JIRA is a bit more advanced as well as customizable for software project management, so can’t ask to switch to GitHub at this time (still I prefer GitHub).&lt;/p&gt;
&lt;h2 id=&quot;github-checks&quot;&gt;GitHub Checks&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#github-checks&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are several GitHub apps which is capable of running powerful checks against the code changes in the repository.
Apps that perform continuous integration, code linting, or code scanning services and provide detailed feedback on commits.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/checks.a1F46CL3_2n9NzA.webp&quot; alt=&quot;GitHub Checks&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;929&quot; height=&quot;443&quot;&gt;&lt;figcaption&gt;GitHub Checks&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;release-notes&quot;&gt;Release Notes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#release-notes&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The GitHub releases are a great way to share the latest version of your code.
The &lt;strong&gt;release notes&lt;/strong&gt; associated with the release are a great way to share the changes in the code.
 &lt;img src=&quot;https://www.abhith.net/_astro/releases.DQ39CC--_Z8scbx.webp&quot; alt=&quot;Releases&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;&lt;/p&gt;
&lt;p&gt;Do you know that GitHub can help in making release notes?
 &lt;img src=&quot;https://www.abhith.net/_astro/release-notes.Dlt2i8Sw_Z1iVk1q.webp&quot; alt=&quot;Release notes&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1261&quot; height=&quot;912&quot;&gt;&lt;/p&gt;
&lt;p&gt;Having the release notes part of each release, and helping with making the release notes is another plus side of Github.&lt;/p&gt;
&lt;h2 id=&quot;azure-pipelines-vs-github-actions&quot;&gt;Azure Pipelines vs GitHub Actions&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#azure-pipelines-vs-github-actions&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Azure Pipelines are way matured compared to GitHub Actions (👈 this may change in the future).&lt;/p&gt;
&lt;p&gt;But yes, a complete switch to GitHub from Azure DevOps might be possible by replacing Azure DevOps pipelines with GitHub actions.
But people mostly hate change when things are working fine with the current setup.
So one step at a time in terms of change.&lt;/p&gt;
&lt;p&gt;i.e First code migration, then slowly pipelines.
The first candidate for GitHub Actions can be PR builds.&lt;/p&gt;
&lt;p&gt;While comparing both, I love the following facts about the GitHub action,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy to create by just placing the workflow file in the &lt;code&gt;.github/workflows&lt;/code&gt; directory. Whereas Azure DevOps requires you to create a new pipeline in the UI.&lt;/li&gt;
&lt;li&gt;Suggestions for the workflow file are provided in the GitHub action UI based on your project’s type.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;mobile-application&quot;&gt;Mobile Application&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#mobile-application&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GitHub’s mobile application is a great way to manage your code.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can do PR review,&lt;/li&gt;
&lt;li&gt;Merge code,&lt;/li&gt;
&lt;li&gt;And so on,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All through the mobile app.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/app_GitHub.BrtKa2we_Z28riuj.webp&quot; alt=&quot;GitHub Mobile App&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1440&quot; height=&quot;3040&quot;&gt;&lt;figcaption&gt;GitHub Mobile App&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Azure DevOps doesn’t have such a mobile application but you can access the DevOps portal through the mobile browser, the UI is somewhat responsive, but the experience is still way better in GitHub’s mobile app, and the app is getting new features on every release.&lt;/p&gt;
&lt;h2 id=&quot;powerful-web-based-editor-vs-code-on-web&quot;&gt;Powerful web-based editor (VS Code on Web)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#powerful-web-based-editor-vs-code-on-web&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;I never liked &amp;quot;.&amp;quot; this much.&lt;br&gt;&lt;br&gt;We can open any &lt;a href=&quot;https://x.com/hashtag/github?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#github&lt;/a&gt; repo on &lt;a href=&quot;https://x.com/hashtag/vscode?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#vscode&lt;/a&gt;, directly on your browser, by simply pressing &amp;quot;.&amp;quot; (no quotes, just that dot).&lt;br&gt;&lt;br&gt;The repo will open in &lt;a href=&quot;https://t.co/P2oEcfcGFA&quot;&gt;https://t.co/P2oEcfcGFA&lt;/a&gt;, a kind of Visual Studio Code on the browser. &lt;a href=&quot;https://t.co/ZUFNJe443s&quot;&gt;pic.twitter.com/ZUFNJe443s&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1504864768389222404?ref_src=twsrc%5Etfw&quot;&gt;March 18, 2022&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.dev/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;github.dev&lt;/a&gt; and the shortcut ”.”, 👌. I am using it more often, even this blog am maintaining most of the time via the web editor of GitHub.&lt;/p&gt;
&lt;h2 id=&quot;and&quot;&gt;And&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#and&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;PR review is much better on GitHub. The sticky checkbox on each file is way better than the sidebar static checkboxes in the Azure DevOps.&lt;/li&gt;
&lt;li&gt;The GitHub organization landing page with repositories sorted by last updated gives a better insight to the team.&lt;/li&gt;
&lt;li&gt;The total number of repositories indicator in GitHub is a good metric, not sure how to find the total number of repositories in the Azure DevOps organization since repositories are kept under projects in the Azure DevOps organization.&lt;/li&gt;
&lt;li&gt;The GitHub community. You can follow external projects, and people and can learn from them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;pricing&quot;&gt;Pricing&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#pricing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Looks complicated on GitHub. In most places, it is like &lt;code&gt;Contact Sales&lt;/code&gt;.
The change would be an easier task if the billing could be done through an Azure Subscription but it looks like it is not possible at the moment.&lt;/p&gt;
&lt;p&gt;Anyway, the free plan offers enough feature sets to start with GitHub.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;If you plan to migrate to GitHub, the following sections will help you.&lt;/p&gt;
&lt;h2 id=&quot;code-migration-from-azure-devops-to-github&quot;&gt;Code Migration From Azure DevOps to GitHub&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#code-migration-from-azure-devops-to-github&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The code repository migration from Azure DevOps to GitHub is pretty easy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Import repository
 &lt;img src=&quot;https://www.abhith.net/_astro/import-repo.bKtcm5jm_khoCz.webp&quot; alt=&quot;Import repository&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1011&quot; height=&quot;910&quot;&gt;&lt;/li&gt;
&lt;li&gt;Give your Azure DevOps Repo URL, and fill in the rest.&lt;/li&gt;
&lt;li&gt;And on the next screen, it will ask for credentials to access your DevOps repo. &lt;code&gt;Git credentials&lt;/code&gt; for the Azure DevOps repo will work fine. You can generate that one on the clone window on Azure DevOps as shown below.
 &lt;img src=&quot;https://www.abhith.net/_astro/git-credentials.D70bhAwJ_Z1Jg9EO.webp&quot; alt=&quot;Azure DevOps &gt; Git Credentials&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;929&quot;&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s it. You will not miss any code history after migration.&lt;/p&gt;
&lt;h2 id=&quot;change-azure-pipeline-repository-from-azure-devops-to-github&quot;&gt;Change Azure Pipeline Repository From Azure DevOps to GitHub&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#change-azure-pipeline-repository-from-azure-devops-to-github&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Since in our case, we have all pipelines already configured in the DevOps.
And don’t want to change any of them other than the repository location.
This can be done by following the below steps.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Edit the existing pipeline&lt;/li&gt;
&lt;li&gt;In the upper right corner open the … menu&lt;/li&gt;
&lt;li&gt;Pick the ⚡ Triggers option&lt;/li&gt;
&lt;li&gt;Click the YAML tab&lt;/li&gt;
&lt;li&gt;Click the Get Sources option&lt;/li&gt;
&lt;li&gt;Reconfigure the source repo to GitHub.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You might need to choose a &lt;code&gt;GitHub connection&lt;/code&gt; to pick the repo.
For that, better to install the &lt;a href=&quot;https://github.com/marketplace/azure-pipelines?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Azure Pipelines&lt;/a&gt; GitHub app and give it access to the repository.
Which will create a connection back to your Azure DevOps account.&lt;/p&gt;
&lt;h2 id=&quot;final-notes&quot;&gt;Final Notes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#final-notes&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After reading this,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Are you convinced that GitHub is better compared to Azure DevOps for code?&lt;/li&gt;
&lt;li&gt;If you are a GitHub pro, did I miss any goodness of GitHub over Azure DevOps in terms of code management?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let me know in the comments below 👇&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://acloudguru.com/blog/engineering/azure-devops-vs-github-comparing-microsofts-devops-twins?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Azure DevOps vs GitHub: Comparing Microsoft’s DevOps Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.upguard.com/blog/microsoft-visual-studio-team-services-vs-github?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=github-vs-azure-devops-for-code&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Azure DevOps vs GitHub | UpGuard&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2022-07-20&quot;&gt;2022-07-20&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-07-20&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added the &lt;strong&gt;Powerful web-based editor&lt;/strong&gt; section&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2022-07-13&quot;&gt;2022-07-13&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-07-13&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added the &lt;strong&gt;And&lt;/strong&gt; section&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2022-06-07&quot;&gt;2022-06-07&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-06-07&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added &lt;strong&gt;Release Notes&lt;/strong&gt; and &lt;strong&gt;Mobile Application&lt;/strong&gt; sections.&lt;/li&gt;
&lt;li&gt;Updated &lt;strong&gt;Azure Pipelines vs GitHub Actions&lt;/strong&gt; section.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;&lt;a href=&quot;https://x.com/hashtag/github?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#github&lt;/a&gt; vs &lt;a href=&quot;https://x.com/hashtag/AzureDevOps?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#AzureDevOps&lt;/a&gt; - for code.&lt;br&gt;&lt;br&gt;Comparing GitHub and Azure DevOps for code management and related features. Hopefully, this post will encourage you to switch to GitHub.&lt;a href=&quot;https://t.co/ZNnEPhnKgQ&quot;&gt;https://t.co/ZNnEPhnKgQ&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1488579218971807756?ref_src=twsrc%5Etfw&quot;&gt;February 1, 2022&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>github</category><category>azure-devops</category><author>Abhith Rajan</author></item><item><title>2021 Year In Review</title><link>https://www.abhith.net/blog/2021-year-in-review/</link><guid isPermaLink="true">https://www.abhith.net/blog/2021-year-in-review/</guid><description>Abhith Rajan&apos;s 2021 year end reflection.</description><pubDate>Tue, 25 Jan 2022 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;A bit late to review 2021 work-life but “better late than never”, right?&lt;/p&gt;
&lt;p&gt;In 2021, my focus was on mainly &lt;strong&gt;&lt;a href=&quot;https://www.abhith.net/topics/cloud-native/&quot;&gt;Cloud Native&lt;/a&gt;&lt;/strong&gt; solutions. And one of my favorites of last year is, &lt;strong&gt;&lt;a href=&quot;https://www.abhith.net/topics/dapper/&quot;&gt;Dapr&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Other interesting findings of last year are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.abhith.net/topics/backstage/&quot;&gt;Backstage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.abhith.net/topics/cloudevents/&quot;&gt;CloudEvents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/dotnet/tye?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=2021-year-in-review&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Tye&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the list goes on.&lt;/p&gt;
&lt;p&gt;Let’s talk about work for now.&lt;/p&gt;
&lt;h2 id=&quot;more-azure&quot;&gt;More Azure&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#more-azure&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I’m an &lt;a href=&quot;https://www.abhith.net/topics/azure/&quot;&gt;Azure&lt;/a&gt; guy. Interacting with it almost every working day.
My 2021 facts related to Azure are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Started using more &lt;a href=&quot;https://www.abhith.net/topics/azure-logic-apps/&quot;&gt;Azure Logic Apps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Used &lt;a href=&quot;https://www.abhith.net/topics/cosmos-db/&quot;&gt;Azure Cosmos DB&lt;/a&gt; the first time - it is our event store now.&lt;/li&gt;
&lt;li&gt;Integrated Azure maps&lt;/li&gt;
&lt;li&gt;Used &lt;a href=&quot;https://www.abhith.net/topics/azure-cognitive-search/&quot;&gt;Azure Cognitive Search&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Baby steps with Azure Synapse + Power BI&lt;/li&gt;
&lt;li&gt;Azure app configuration + Feature flags - Advocating colleagues to use feature flags.&lt;/li&gt;
&lt;li&gt;Release annotation in &lt;a href=&quot;https://www.abhith.net/topics/app-insights/&quot;&gt;Azure Application Insights&lt;/a&gt; - Want to make it part of CD, TODO for 2022.&lt;/li&gt;
&lt;li&gt;Started switching to Azure Managed Identity&lt;/li&gt;
&lt;li&gt;Played with &lt;a href=&quot;https://www.abhith.net/topics/machine-learning/&quot;&gt;ML Studio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;rest-of-the-work&quot;&gt;Rest of the work&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#rest-of-the-work&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Some of the other notable things I was doing last year are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduced geofence-based solutions - Hoo, the left-hand rule.&lt;/li&gt;
&lt;li&gt;Migrated to &lt;a href=&quot;https://www.abhith.net/topics/jira/&quot;&gt;JIRA&lt;/a&gt; cloud and set up some easy JIRA automation.&lt;/li&gt;
&lt;li&gt;Now everywhere &lt;a href=&quot;https://www.abhith.net/topics/cloudevents/&quot;&gt;CloudEvents&lt;/a&gt; - I like that spec.&lt;/li&gt;
&lt;li&gt;Done &lt;a href=&quot;https://www.abhith.net/topics/azure-devops/&quot;&gt;CI/CD&lt;/a&gt; setup for Java, &lt;a href=&quot;https://www.abhith.net/topics/angular/&quot;&gt;Angular&lt;/a&gt; projects other than &lt;a href=&quot;https://www.abhith.net/topics/dotnet/&quot;&gt;.NET&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;More into &lt;a href=&quot;https://www.abhith.net/topics/event-sourcing/&quot;&gt;Event-driven&lt;/a&gt; architectures.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And yeah, we switched to &lt;strong&gt;Postman&lt;/strong&gt; cloud.
The Postman is a good tool but for a &lt;a href=&quot;https://www.abhith.net/topics/microservices/&quot;&gt;microservice&lt;/a&gt; guy like me, the tabs are not enough.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Tab groups in &lt;a href=&quot;https://x.com/hashtag/Chrome?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Chrome&lt;/a&gt; are so good for devs.&lt;br&gt;I wish &lt;a href=&quot;https://x.com/hashtag/postman?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#postman&lt;/a&gt; had something similar. &lt;a href=&quot;https://t.co/QIk22kkjGZ&quot;&gt;pic.twitter.com/QIk22kkjGZ&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1408467163690713093?ref_src=twsrc%5Etfw&quot;&gt;June 25, 2021&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;h2 id=&quot;pure-work&quot;&gt;Pure Work&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#pure-work&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;During this period, I have introduced around 12 RFCs in my workplace out of that 9 got landed in the production already.
Rest are on the way. If you wonder what is an RFC, it is where we propose a new feature (major) to be developed, and the way it should be developed, some more deep dives into technical plus user stories on the same.&lt;/p&gt;
&lt;p&gt;And I closed almost 263 JIRA work items during the same period.&lt;/p&gt;
&lt;p&gt;A major role that I handled last year is to team up with a &lt;strong&gt;Java&lt;/strong&gt; resource where I managed the work.
Even though I am not a &lt;strong&gt;Java&lt;/strong&gt; guy, I was reviewing the PRs (even corrected some, 😁).
And it went really well, together we delivered &lt;em&gt;7&lt;/em&gt; java microservice &lt;em&gt;components&lt;/em&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;components&lt;/code&gt; term came to me from &lt;a href=&quot;https://www.abhith.net/topics/backstage/&quot;&gt;Backstage&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Regarding &lt;strong&gt;PR&lt;/strong&gt;s, previously I was following &lt;strong&gt;Gitflow&lt;/strong&gt;, now switched to &lt;strong&gt;GitHub flow&lt;/strong&gt;.
And for release, &lt;strong&gt;Release Flow&lt;/strong&gt; as recommended by &lt;a href=&quot;https://devblogs.microsoft.com/devops/release-flow-how-we-do-branching-on-the-vsts-team/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=2021-year-in-review&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Microsoft VSTS Team&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When I switch any of my workflow or tools, I always recommend my colleagues to follow the same by pointing out the benefits.
My interest in &lt;a href=&quot;https://www.abhith.net/topics/backstage/&quot;&gt;Backstage&lt;/a&gt; is because I care about developer experience too.
Always looking for great ways to organize work, improve the workflows.&lt;/p&gt;
&lt;h2 id=&quot;plans-for-2022&quot;&gt;Plans for 2022&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#plans-for-2022&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Even though I’m working mostly on the Azure, never went for a certification. This year, I will.&lt;/li&gt;
&lt;li&gt;After delivering several components (stable, reliable, and feature-rich) successfully by just &lt;strong&gt;managing&lt;/strong&gt; the work, I realized that way I can contribute more to the work. Feels like time to go up a level, let’s see.&lt;/li&gt;
&lt;li&gt;Code migration from &lt;a href=&quot;https://www.abhith.net/topics/azure-devops/&quot;&gt;Azure DevOps&lt;/a&gt; to &lt;a href=&quot;https://www.abhith.net/topics/github/&quot;&gt;GitHub&lt;/a&gt;: Advocating team about the benefits of &lt;strong&gt;GitHub&lt;/strong&gt; over &lt;strong&gt;Azure DevOps&lt;/strong&gt; for code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wish me a good year 😊&lt;/p&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Wish me a good year 😊&lt;a href=&quot;https://t.co/kSgkIfIMyK&quot;&gt;https://t.co/kSgkIfIMyK&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1486046399846567936?ref_src=twsrc%5Etfw&quot;&gt;January 25, 2022&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>general</category><author>Abhith Rajan</author></item><item><title>ASP.NET Core - OAuth 2.0 Client Access Token Management</title><link>https://www.abhith.net/blog/aspnet-core-oauth-2-0-client-access-token-management/</link><guid isPermaLink="true">https://www.abhith.net/blog/aspnet-core-oauth-2-0-client-access-token-management/</guid><description>OAuth 2.0 client access token management in an ASP.NET Core application</description><pubDate>Sun, 09 Jan 2022 14:11:27 GMT</pubDate><content:encoded>&lt;p&gt;In a &lt;strong&gt;microservice&lt;/strong&gt; world, the machine (microservice A) to machine (microservice B) communications can be secured using an &lt;strong&gt;OAuth 2.0&lt;/strong&gt; compatible token service, &lt;strong&gt;IdentityServer&lt;/strong&gt; in our case. i.e To successfully call microservice B, microservice A needs to get an access token first via client credentials grant type from the IdentityServer with the right scope for the operation.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;microservice A calls IdentityServer to get an &lt;code&gt;access token&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;microservice A then calls microservice B with the access token in the authorization header (bearer token).&lt;/li&gt;
&lt;li&gt;microservice B validates the access token, responds to microservice A with a valid response.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The above steps are fine for a single call, but in case of multiple calls from A to B, A doesn’t need to get an IdentityServer token every time since each token has its validity, so basically, A can reuse the token until it expires.&lt;/p&gt;
&lt;p&gt;For the token reusing, you don’t need to implement the caching and refreshing token logic anywhere since some good people who are maintaining &lt;a href=&quot;https://github.com/IdentityModel/IdentityModel.AspNetCore?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-oauth-2-0-client-access-token-management&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;IdentityModel.AspNetCore&lt;/a&gt; already done that. All we need to do is set up it, and consume it.&lt;/p&gt;
&lt;p&gt;The library will take care of the following,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;caching abstraction for access tokens&lt;/li&gt;
&lt;li&gt;automatic renewal of expired access tokens&lt;/li&gt;
&lt;li&gt;token lifetime automation for HttpClient&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;let’s jump into the setup. Following are our assumptions,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;microservice B has endpoints,
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;POST /orders&lt;/code&gt; and it requires IdentityServer token with &lt;code&gt;orders.write&lt;/code&gt; scope to create new orders,&lt;/li&gt;
&lt;li&gt;and to fetch the orders &lt;code&gt;GET /orders&lt;/code&gt; endpoint, the scope for that one is &lt;code&gt;orders.read&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;microservice A has valid client credentials configured on the IdentityServer with the above scopes added to the allowed scopes. i.e microservice A is allowed to call the microservice B.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So let’s configure microservice A,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;code&gt;IdentityModel.AspNetCore&lt;/code&gt; package&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the &lt;code&gt;Startup.cs&lt;/code&gt; &amp;gt; &lt;code&gt;ConfigureServices&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Setup token management service&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddAccessTokenManagement&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Client&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Clients&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AppConsts&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StsClientName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ClientCredentialsTokenRequest&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Address&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetValue&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication:Sts:BaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;)}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;/connect/token&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Token service (IdentityServer) base URL&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClientId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication:Sts:ClientId&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClientSecret&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication:Sts:ClientSecret&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Scope&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AppConsts&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OrdersWriteScope&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AppConsts&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OrdersReadScope&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Any number of scopes, space separated&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Adds a named HTTP client for the factory that automatically sends the client access token&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddClientAccessTokenClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AppConsts&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StsClientName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AppConsts&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StsClientName&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;client&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;client&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;BaseAddress&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Uri&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ApiBaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))); &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// microservice B base URL&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;// Setup token management serviceservices.AddAccessTokenManagement(options =&gt;{  options.Client.Clients.Add(AppConsts.StsClientName, new ClientCredentialsTokenRequest  {    Address = $&amp;quot;{Configuration.GetValue&lt;string&gt;(&amp;quot;Authentication:Sts:BaseUrl&amp;quot;)}/connect/token&amp;quot;, // Token service (IdentityServer) base URL    ClientId = Configuration.GetValue&lt;string&gt;(&amp;quot;Authentication:Sts:ClientId&amp;quot;),    ClientSecret = Configuration.GetValue&lt;string&gt;(&amp;quot;Authentication:Sts:ClientSecret&amp;quot;),    Scope = $&amp;quot;{AppConsts.OrdersWriteScope} {AppConsts.OrdersReadScope}&amp;quot; // Any number of scopes, space separated  });});// Adds a named HTTP client for the factory that automatically sends the client access tokenservices.AddClientAccessTokenClient(AppConsts.StsClientName, AppConsts.StsClientName, client =&gt; client.BaseAddress = new Uri(Configuration.GetValue&lt;string&gt;(&amp;quot;ApiBaseUrl&amp;quot;))); // microservice B base URL&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Here we setup the token management service and a named HttpClient that uses the same.
Also you can observe, we moved the static string params to a &lt;code&gt;AppConsts.cs&lt;/code&gt; file,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AppConsts&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;OrdersWriteScope&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;orders.write&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;OrdersReadScope&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;orders.read&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;StsClientName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;microservice_a_api_client&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public class AppConsts{    public const string OrdersWriteScope = &amp;quot;orders.write&amp;quot;;    public static string OrdersReadScope = &amp;quot;orders.read&amp;quot;;    public static string StsClientName = &amp;quot;microservice_a_api_client&amp;quot;;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And the configurations like client credentials, token service endpoint, and rest are kept in the &lt;code&gt;appsettings.json&lt;/code&gt; or somewhere more private like Azure App Configuration, keyvault, and loaded to the aspnetcore configurations.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ApiBaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://microservice-b.com&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Sts&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;BaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://my-identityserver.com&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;ClientId&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;microservice_a_api&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;ClientSecret&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &amp;quot;ApiBaseUrl&amp;quot;: &amp;quot;https://microservice-b.com&amp;quot;,  &amp;quot;Authentication&amp;quot;: {    &amp;quot;Sts&amp;quot;: {      &amp;quot;BaseUrl&amp;quot;: &amp;quot;https://my-identityserver.com&amp;quot;,      &amp;quot;ClientId&amp;quot;: &amp;quot;microservice_a_api&amp;quot;,      &amp;quot;ClientSecret&amp;quot;: &amp;quot;&amp;quot;    }  },&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Configuration is done, now let’s consume the &lt;code&gt;HttpClient&lt;/code&gt;.
Here I’m using &lt;code&gt;Flurl&lt;/code&gt; to make the HTTP request, if you prefer direct HttpClient usage, you can do that way. You don’t need to do anything special to get the access token since it is already taken care of.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Flurl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Http&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;GetOrdersQueryHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IRequestHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeInput&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeOutput&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;readonly&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IFlurlClient&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;_flurlClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetOrdersQueryHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IHttpClientFactory&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;httpClientFactory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;httpClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;httpClientFactory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AppConsts&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StsClientName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_flurlClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;FlurlClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;httpClient&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeOutput&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Handle&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeInput&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CancellationToken&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;cancellationToken&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_flurlClient&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;/orders&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetJsonAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeOutput&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;cancellationToken&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Flurl.Http;public class GetOrdersQueryHandler : IRequestHandler&lt;SomeInput, SomeOutput&gt;{    private readonly IFlurlClient _flurlClient;    public GetOrdersQueryHandler(IHttpClientFactory httpClientFactory)    {        var httpClient = httpClientFactory.CreateClient(AppConsts.StsClientName);        _flurlClient = new FlurlClient(httpClient);    }    public async Task&lt;SomeOutput&gt; Handle(SomeInput request, CancellationToken cancellationToken)    {        return await _flurlClient                .Request($&amp;quot;/orders&amp;quot;)                .GetJsonAsync&lt;SomeOutput&gt;(cancellationToken);    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;As you can see, we use the named httpClient, and that client is already configured to have the access token with the scopes.
That’s it. You can use the same way to call the create order endpoint since the client has an access token with both scopes.&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://identitymodel.readthedocs.io/en/latest/aspnetcore/overview.html?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-oauth-2-0-client-access-token-management&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Identitymodel For Workers And Web Apps&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>aspnet-core</category><category>api-management</category><category>identityserver</category><author>Abhith Rajan</author></item><item><title>Azure Cognitive Search - GeographyPoint to GeoJSON in .NET 5</title><link>https://www.abhith.net/blog/azure-cognitive-search-geographypoint-to-geojson-in-dotnet-5/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-cognitive-search-geographypoint-to-geojson-in-dotnet-5/</guid><description>Microsoft.Spatial GeographyPoint to GeoJSON in .NET5 using System.Text.Json.</description><pubDate>Sat, 13 Mar 2021 17:11:27 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Azure Cognitive Search Service&lt;/strong&gt; supported data types includes &lt;code&gt;Edm.GeographyPoint&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;While creating index definition using attributes in &lt;code&gt;C#&lt;/code&gt;, to specify the field type as &lt;code&gt;Edm.GeographyPoint&lt;/code&gt; we can use the &lt;code&gt;GeographyPoint&lt;/code&gt; as the type.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Azure&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Search&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Documents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Indexes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Spatial&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RestaurantIndexModel&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SimpleField&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;IsFilterable&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;IsSortable&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;GeographyPoint&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Location&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Azure.Search.Documents.Indexes;using Microsoft.Spatial;public class RestaurantIndexModel{    ...    [SimpleField(IsFilterable = true, IsSortable = true)]    public GeographyPoint Location { get; set; }    ...}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;We need to have the NuGet package &lt;code&gt;Microsoft.Spatial&lt;/code&gt; to use the &lt;code&gt;GeographyPoint&lt;/code&gt; type.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PackageReference&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Microsoft.Spatial&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;7.8.3&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;PackageReference Include=&amp;quot;Microsoft.Spatial&amp;quot; Version=&amp;quot;7.8.3&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And with that, you can create the index definition,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/index-definition.N_l9JXbf_1OwLHG.webp&quot; alt=&quot;Index definition&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1048&quot; height=&quot;610&quot;&gt;&lt;figcaption&gt;Index definition&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;But when you try to index a document with the same type,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;restaurant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Location&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;GeographyPoint&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Create&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;restaurantResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Latitude&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;restaurantResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Longitude&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;restaurant.Location = GeographyPoint.Create(restaurantResult.Value.Latitude, restaurantResult.Value.Longitude);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;You may encounter the following issue,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;error&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;code&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;message&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;The request is invalid. Details: parameters : Invalid GeoJSON. The &amp;#39;type&amp;#39; member is required, but was not found.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;\r\n&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{  &amp;quot;error&amp;quot;: {    &amp;quot;code&amp;quot;: &amp;quot;&amp;quot;,    &amp;quot;message&amp;quot;: &amp;quot;The request is invalid. Details: parameters : Invalid GeoJSON. The &apos;type&apos; member is required, but was not found.\r\n&amp;quot;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The way you can fix this is by,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add the following NuGet package,&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PackageReference&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Microsoft.Azure.Core.Spatial&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.0.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;PackageReference Include=&amp;quot;Microsoft.Azure.Core.Spatial&amp;quot; Version=&amp;quot;1.0.0&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And then annotate your index model to use the &lt;code&gt;MicrosoftSpatialGeoJsonConverter&lt;/code&gt; as the &lt;strong&gt;JsonConverter&lt;/strong&gt; by,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Json&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Serialization&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Azure&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Core&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Serialization&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Azure&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Search&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Documents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Indexes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Spatial&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RestaurantIndexModel&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;JsonConverter&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;MicrosoftSpatialGeoJsonConverter&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SimpleField&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;IsFilterable&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;IsSortable&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;GeographyPoint&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Location&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using System.Text.Json.Serialization;using Azure.Core.Serialization;using Azure.Search.Documents.Indexes;using Microsoft.Spatial;public class RestaurantIndexModel{    ...    [JsonConverter(typeof(MicrosoftSpatialGeoJsonConverter))]    [SimpleField(IsFilterable = true, IsSortable = true)]    public GeographyPoint Location { get; set; }    ...}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That will do.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/indexed-doc.DYtbAX2p_I6XjN.webp&quot; alt=&quot;Indexd document&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1044&quot; height=&quot;690&quot;&gt;&lt;figcaption&gt;Indexd document&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-converters-how-to?pivots=dotnet-5-0&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-cognitive-search-geographypoint-to-geojson-in-dotnet-5&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;How to write custom converters for JSON serialization - .NET&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/api/overview/azure/microsoft.core.spatial-readme-pre?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-cognitive-search-geographypoint-to-geojson-in-dotnet-5&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;System.Text.Json support for Microsoft.Spatial library for .NET - Azure for .NET Developers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>dotnet</category><category>azure-cognitive-search</category><author>Abhith Rajan</author></item><item><title>NDepend - The Best-in-class Static Code Analyzer for Dotnet</title><link>https://www.abhith.net/blog/ndepend-the-best-in-class-static-code-analyzer-for-dotnet/</link><guid isPermaLink="true">https://www.abhith.net/blog/ndepend-the-best-in-class-static-code-analyzer-for-dotnet/</guid><description>NDepend is my favorite static code analyzer for dotnet. Check how I use it.</description><pubDate>Wed, 09 Dec 2020 15:11:27 GMT</pubDate><content:encoded>&lt;p&gt;If you check my &lt;a href=&quot;https://www.abhith.net/about/&quot;&gt;about&lt;/a&gt; page, I have mentioned that,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My role involves prototyping, developing backend as well as front end apps with modern workflows, frameworks. &lt;strong&gt;Keeping an eye on the patterns and organized code.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To keep the code organized and to make sure the quality is met, I depend on &lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend&lt;/a&gt; is the best-in-class static code analyzer for &lt;a href=&quot;https://www.abhith.net/topics/dotnet/&quot;&gt;dotnet&lt;/a&gt;. And the best come with a price too, i.e it’s a PAID tool. &lt;a href=&quot;https://www.linkedin.com/in/patrick-smacchia-b0123110/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Someone&lt;/a&gt; was kind enough to send me a licensed version.&lt;/p&gt;
&lt;p&gt;When I tried &lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend&lt;/a&gt; the first time, it was overwhelming, the amount of information it throws out after analysis was too much 😲.
Still am exploring many sides of the information it shares. In this post, I will share how I use it and the areas where it helps.&lt;/p&gt;
&lt;h2 id=&quot;initial-setup&quot;&gt;Initial Setup&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#initial-setup&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Once you download the package, getting started is easy. Run the app and its Start page got everything you need to get started,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/startpage_censored.CT8VsnkA_Z23Tg0C.webp&quot; alt=&quot;Start Page&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;913&quot; height=&quot;690&quot;&gt;&lt;figcaption&gt;Start Page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In my case, I installed the visual studio extension. With that, you can easily attach a new or existing &lt;strong&gt;NDepend project&lt;/strong&gt; with the opened solution.&lt;/p&gt;
&lt;p&gt;Eh, what is an NDepend project?&lt;/p&gt;
&lt;p&gt;This is mentioned in their getting started docs.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://www.ndepend.com/docs/getting-started-with-ndepend?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Getting Started with NDepend&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A NDepend project can be attached to several Visual Studio solutions.&lt;/li&gt;
&lt;li&gt;This is useful if you wish to analyze several .NET assemblies compiled with several Visual Studio solutions.&lt;/li&gt;
&lt;li&gt;A benefit will be the possibility to navigate across several Visual Studio solutions opened in several Visual Studio instances.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once the initial setup and first analysis of the project are done, you will be presented with the analysis report. And it will be part of its dashboard.&lt;/p&gt;
&lt;h2 id=&quot;dashboard&quot;&gt;Dashboard&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dashboard&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I love metrics and staring at them is one of my hobbies. So do I love the &lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend&lt;/a&gt; dashboard since it shows all the metrics nicely.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/dashboard-1_censored.DKeBbAad_hbWbC.webp&quot; alt=&quot;Dashboard Metrics&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;769&quot; height=&quot;674&quot;&gt;&lt;figcaption&gt;Dashboard Metrics&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Want to check how the code evolved compared to a previous date?
Just choose the baseline to any previous analysis date.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/dashboard-diff-baseline_censored.Bdz1Nomf_1uicoF.webp&quot; alt=&quot;Different Baseline Metrics&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;763&quot; height=&quot;674&quot;&gt;&lt;figcaption&gt;Different Baseline Metrics&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Want some charts?&lt;/p&gt;
&lt;p&gt;Here we go. Following are the default ones ready for you to see the trend.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/dashboard-2.DQiKuihj_10r25C.webp&quot; alt=&quot;Dashboard Trend Charts&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;858&quot; height=&quot;893&quot;&gt;&lt;figcaption&gt;Dashboard Trend Charts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Noticed the &lt;strong&gt;Create Trend Chart&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;We can create more trend charts as per our needs and metrics can be selected from a categorized list. In which one category I like is the &lt;strong&gt;Third-Party Usage&lt;/strong&gt;,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/Third-Party-Trend.CTZB4kG1_ZW5RKH.webp&quot; alt=&quot;Third-Party Usage Trend&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;934&quot; height=&quot;526&quot;&gt;&lt;figcaption&gt;Third-Party Usage Trend&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;So far, I just scratched the surface of the &lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Ndepend&lt;/a&gt; tool only. More about it is on the way.&lt;/p&gt;
&lt;p&gt;In the meantime check out these great articles about &lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend&lt;/a&gt;, which share a lot (really, a lot) about its features.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tomassetti.me/ndepend/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend: Static Analysis For Software Architects - Review | tomassetti.me&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.c-sharpcorner.com/article/ndepend-a-complete-static-code-analysis-tool/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend - A Complete Static Code Analysis Tool | c-sharpcorner.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dev.to/chris_mckelt/ndepend-code-analysis-415a?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend code analysis | dev.to&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://killalldefects.com/2019/11/02/tracking-dotnet-code-quality-with-ndepend/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Tracking .NET Code Quality with NDepend - Kill All Defects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://medium.com/@alexandre.malavasi/code-quality-with-ndepend-tool-net-core-854ec070b47d?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Code Quality with NDepend tool — .NET Core&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://anthonygiretti.com/2020/05/09/integrate-ndepend-2020-into-your-net-core-projects/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Integrate NDepend 2020 into your .NET Core projects – Anthony Giretti’s .NET blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://surfingthecode.com/it-ndepends-part-3-new-dependency-graph-in-ndepend-2020.1/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ndepend-the-best-in-class-static-code-analyzer-for-dotnet&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;It NDepends! Part 3: New dependency graph in NDepend 2020.1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>dotnet</category><category>ide</category><category>c-sharp</category><author>Abhith Rajan</author></item><item><title>Azure Logic Apps - Get Application Insights/Azure Monitor Logs Query Result on Microsoft Teams</title><link>https://www.abhith.net/blog/azure-logic-apps-get-application-insights-azure-monitor-logs-query-result-on-microsoft-teams/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-logic-apps-get-application-insights-azure-monitor-logs-query-result-on-microsoft-teams/</guid><description>Use Azure Logic Apps to create daily reports from Application Insights or Azure Monitor Logs and receive it on Microsoft Teams.</description><pubDate>Tue, 17 Nov 2020 22:11:27 GMT</pubDate><content:encoded>&lt;p&gt;I love to monitor things. &lt;strong&gt;Application Insights&lt;/strong&gt; is one of my favorite tools in this category.
Checking &lt;strong&gt;Failures&lt;/strong&gt; and &lt;strong&gt;Performance&lt;/strong&gt; sections on the Application Insights were my first thing in the morning for some time in the past.
Since some apps especially built by third parties lack Application Insights integration, we check &lt;strong&gt;Application Gateway&lt;/strong&gt; access logs too.&lt;/p&gt;
&lt;p&gt;Instead of manually checking every day, to ease the process what I did is configured a couple of logic apps to send a message on the &lt;strong&gt;Teams&lt;/strong&gt; channel with a list of results from &lt;strong&gt;Application Insights&lt;/strong&gt; and &lt;strong&gt;Azure Monitor&lt;/strong&gt; Logs.&lt;/p&gt;
&lt;p&gt;The configured daily reports include,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Application Insights - Performance&lt;/li&gt;
&lt;li&gt;Application Gateway - Failures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The steps involved in configuring these are almost similar.&lt;/p&gt;
&lt;p&gt;First, you need to define the query, in the logs section of each service try out your query and see if the expected results coming.
Then we need to design an &lt;strong&gt;Adaptive card&lt;/strong&gt; for teams. This can be easily done on &lt;a href=&quot;https://adaptivecards.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-logic-apps-get-application-insights-azure-monitor-logs-query-result-on-microsoft-teams&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;adaptivecards.io&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;adaptive-cards&quot;&gt;Adaptive Cards&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#adaptive-cards&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Adaptive Cards are platform-agnostic snippets of UI, authored in JSON, that apps and services can openly exchange. When delivered to a specific app, the JSON is transformed into native UI that automatically adapts to its surroundings. It helps design and integrate light-weight UI for all major platforms and frameworks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/adaptive-card-designer.rY3m477C_2xzaY.webp&quot; alt=&quot;Adaptive Cards&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;947&quot;&gt;&lt;figcaption&gt;Adaptive Cards&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The easiest way to design the adaptive card is to pick the matching sample from the &lt;a href=&quot;https://adaptivecards.io/samples/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-logic-apps-get-application-insights-azure-monitor-logs-query-result-on-microsoft-teams&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;adaptivecards.io website&lt;/a&gt; and edit it in the live designer there itself to adjust it to your needs.&lt;/p&gt;
&lt;p&gt;Couple of cards which I designed that suited my needs shared below,&lt;/p&gt;
&lt;h3 id=&quot;simple-card&quot;&gt;Simple card&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#simple-card&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/sample-card.B-QC9GUi_Z1kcslH.webp&quot; alt=&quot;A simple adaptive card&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;627&quot; height=&quot;391&quot;&gt;&lt;figcaption&gt;A simple adaptive card&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;code&gt;schema&lt;/code&gt; of the same given below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;$schema&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;AdaptiveCard&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;speak&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;lt;s&amp;gt;Order update.&amp;lt;/s&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Order Update&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;isSubtle&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;@{triggerBody()?[&amp;#39;Label&amp;#39;]}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;None&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;color&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Attention&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Medium&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Order&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;isSubtle&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;@{json(base64ToString(triggerBody()?[&amp;#39;ContentData&amp;#39;])).OrderId}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Small&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;actions&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Action.OpenUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;View&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;url&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://my-website.com/path/to/resource&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{  &amp;quot;$schema&amp;quot;: &amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;,  &amp;quot;type&amp;quot;: &amp;quot;AdaptiveCard&amp;quot;,  &amp;quot;version&amp;quot;: &amp;quot;1.2&amp;quot;,  &amp;quot;speak&amp;quot;: &amp;quot;&lt;s&gt;Order update.&lt;/s&gt;&amp;quot;,  &amp;quot;body&amp;quot;: [    {      &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,      &amp;quot;columns&amp;quot;: [        {          &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,          &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;,          &amp;quot;items&amp;quot;: [            {              &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,              &amp;quot;text&amp;quot;: &amp;quot;Order Update&amp;quot;,              &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;right&amp;quot;,              &amp;quot;isSubtle&amp;quot;: true            },            {              &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,              &amp;quot;text&amp;quot;: &amp;quot;@{triggerBody()?[&apos;Label&apos;]}&amp;quot;,              &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;,              &amp;quot;spacing&amp;quot;: &amp;quot;None&amp;quot;,              &amp;quot;size&amp;quot;: &amp;quot;Large&amp;quot;,              &amp;quot;color&amp;quot;: &amp;quot;Attention&amp;quot;            }          ]        }      ]    },    {      &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,      &amp;quot;spacing&amp;quot;: &amp;quot;Medium&amp;quot;,      &amp;quot;separator&amp;quot;: true,      &amp;quot;columns&amp;quot;: [        {          &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,          &amp;quot;width&amp;quot;: 1,          &amp;quot;items&amp;quot;: [            {              &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,              &amp;quot;text&amp;quot;: &amp;quot;Order&amp;quot;,              &amp;quot;isSubtle&amp;quot;: true,              &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;            },            {              &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,              &amp;quot;text&amp;quot;: &amp;quot;@{json(base64ToString(triggerBody()?[&apos;ContentData&apos;])).OrderId}&amp;quot;,              &amp;quot;spacing&amp;quot;: &amp;quot;Small&amp;quot;            }          ]        }      ]    }  ],  &amp;quot;actions&amp;quot;: [    {      &amp;quot;type&amp;quot;: &amp;quot;Action.OpenUrl&amp;quot;,      &amp;quot;title&amp;quot;: &amp;quot;View&amp;quot;,      &amp;quot;url&amp;quot;: &amp;quot;https://my-website.com/path/to/resource&amp;quot;    }  ]}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The above card is used to notify when there is a new message in an &lt;strong&gt;Azure Service Bus Topic&lt;/strong&gt; and the &lt;code&gt;@{triggerBody()?[&amp;#39;Label&amp;#39;]}&lt;/code&gt; is used to get the &lt;strong&gt;Message Label&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Similarly, &lt;code&gt;@{json(base64ToString(triggerBody()?[&amp;#39;ContentData&amp;#39;])).OrderId}&lt;/code&gt; is used to get the &lt;code&gt;OrderId&lt;/code&gt; from the message body.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Our focus in this article is on a card with a list of items.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;card-with-a-list-of-items&quot;&gt;Card with a list of items&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#card-with-a-list-of-items&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Initial design with a single row of information will look like,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/card-with-list-of-items-1.Bx8NNBQV_ZEickV.webp&quot; alt=&quot;Card with single row&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;551&quot; height=&quot;386&quot;&gt;&lt;figcaption&gt;Card with single row&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And it’s &lt;code&gt;schema&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; style=&quot;--lnWidth:3ch&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;AdaptiveCard&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;emphasis&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;**Performance (App Insights)**&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;bleed&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;emphasis&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Operation Name&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Count&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Avg&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Percentiles 50 / 99&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;bleed&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;some operation&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;wrap&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Small&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;my app cloud role name&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;wrap&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;321 &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;color&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Attention&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;123ms&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Small&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;456 / 789&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;$schema&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;fallbackText&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;This card requires Adaptive Cards v1.2 support to be rendered properly.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{  &amp;quot;type&amp;quot;: &amp;quot;AdaptiveCard&amp;quot;,  &amp;quot;body&amp;quot;: [    {      &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,      &amp;quot;style&amp;quot;: &amp;quot;emphasis&amp;quot;,      &amp;quot;items&amp;quot;: [        {          &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,          &amp;quot;columns&amp;quot;: [            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;size&amp;quot;: &amp;quot;Large&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;**Performance (App Insights)**&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            }          ]        }      ],      &amp;quot;bleed&amp;quot;: true    },    {      &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,      &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,      &amp;quot;style&amp;quot;: &amp;quot;emphasis&amp;quot;,      &amp;quot;items&amp;quot;: [        {          &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,          &amp;quot;columns&amp;quot;: [            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;Operation Name&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            },            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;Count&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;            },            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;Avg&amp;quot;,                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                },                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;Percentiles 50 / 99&amp;quot;,                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;,              &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;            }          ]        }      ],      &amp;quot;bleed&amp;quot;: true    },    {      &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,      &amp;quot;items&amp;quot;: [        {          &amp;quot;columns&amp;quot;: [            {              &amp;quot;items&amp;quot;: [                {                  &amp;quot;text&amp;quot;: &amp;quot;some operation&amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;wrap&amp;quot;: true                },                {                  &amp;quot;size&amp;quot;: &amp;quot;Small&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;my app cloud role name&amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;wrap&amp;quot;: true                }              ],              &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            },            {              &amp;quot;items&amp;quot;: [                {                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;,                  &amp;quot;separator&amp;quot;: true,                  &amp;quot;text&amp;quot;: &amp;quot;321 &amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;                }              ],              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;            },            {              &amp;quot;items&amp;quot;: [                {                  &amp;quot;color&amp;quot;: &amp;quot;Attention&amp;quot;,                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;123ms&amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;                },                {                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;,                  &amp;quot;size&amp;quot;: &amp;quot;Small&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;456 / 789&amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;                }              ],              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            }          ],          &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;        }      ],      &amp;quot;separator&amp;quot;: true    }  ],  &amp;quot;$schema&amp;quot;: &amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;,  &amp;quot;version&amp;quot;: &amp;quot;1.2&amp;quot;,  &amp;quot;fallbackText&amp;quot;: &amp;quot;This card requires Adaptive Cards v1.2 support to be rendered properly.&amp;quot;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the schema, there are three &lt;strong&gt;Container&lt;/strong&gt;,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First one contains the main heading&lt;/li&gt;
&lt;li&gt;Second column headings&lt;/li&gt;
&lt;li&gt;The last one with the data.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We will be dynamically populating the third container items. And the result looks like,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/app-insights-performance.eeIVGkKO_Z1H0swK.webp&quot; alt=&quot;Card with rows&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;631&quot; height=&quot;513&quot;&gt;&lt;figcaption&gt;Card with rows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And for a reference, A slightly altered design also given below,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/card-with-list-of-items-2.CRZ93eax_Z1sjN1S.webp&quot; alt=&quot;Card with a row of data&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;565&quot; height=&quot;385&quot;&gt;&lt;figcaption&gt;Card with a row of data&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And the &lt;code&gt;schema&lt;/code&gt; for this one is,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; style=&quot;--lnWidth:3ch&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;AdaptiveCard&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;emphasis&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;**Application Gateway - Failed Requests**&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;bleed&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;emphasis&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;URL&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Status&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Count&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;bleed&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/path/to/resource&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;wrap&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;color&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Attention&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Small&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;demo.myapp.com&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;wrap&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;404 &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;123 &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;$schema&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;fallbackText&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;This card requires Adaptive Cards v1.2 support to be rendered properly.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{  &amp;quot;type&amp;quot;: &amp;quot;AdaptiveCard&amp;quot;,  &amp;quot;body&amp;quot;: [    {      &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,      &amp;quot;style&amp;quot;: &amp;quot;emphasis&amp;quot;,      &amp;quot;items&amp;quot;: [        {          &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,          &amp;quot;columns&amp;quot;: [            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;size&amp;quot;: &amp;quot;large&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;**Application Gateway - Failed Requests**&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            }          ]        }      ],      &amp;quot;bleed&amp;quot;: true    },    {      &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,      &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,      &amp;quot;style&amp;quot;: &amp;quot;emphasis&amp;quot;,      &amp;quot;items&amp;quot;: [        {          &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,          &amp;quot;columns&amp;quot;: [            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;URL&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            },            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;Status&amp;quot;,                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;            },            {              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;items&amp;quot;: [                {                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;Count&amp;quot;,                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                }              ],              &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;            }          ]        }      ],      &amp;quot;bleed&amp;quot;: true    },    {      &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,      &amp;quot;items&amp;quot;: [        {          &amp;quot;columns&amp;quot;: [            {              &amp;quot;items&amp;quot;: [                {                  &amp;quot;text&amp;quot;: &amp;quot;/path/to/resource&amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;wrap&amp;quot;: true                },                {                  &amp;quot;color&amp;quot;: &amp;quot;Attention&amp;quot;,                  &amp;quot;size&amp;quot;: &amp;quot;Small&amp;quot;,                  &amp;quot;text&amp;quot;: &amp;quot;demo.myapp.com&amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                  &amp;quot;wrap&amp;quot;: true                }              ],              &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;            },            {              &amp;quot;items&amp;quot;: [                {                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;,                  &amp;quot;separator&amp;quot;: true,                  &amp;quot;text&amp;quot;: &amp;quot;404 &amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;                }              ],              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;            },            {              &amp;quot;items&amp;quot;: [                {                  &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;,                  &amp;quot;separator&amp;quot;: true,                  &amp;quot;text&amp;quot;: &amp;quot;123 &amp;quot;,                  &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;                }              ],              &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,              &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;            }          ],          &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;        }      ],      &amp;quot;separator&amp;quot;: true    }  ],  &amp;quot;$schema&amp;quot;: &amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;,  &amp;quot;version&amp;quot;: &amp;quot;1.2&amp;quot;,  &amp;quot;fallbackText&amp;quot;: &amp;quot;This card requires Adaptive Cards v1.2 support to be rendered properly.&amp;quot;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;When fed with data, the result is,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/application-gateway-failed-requests.DhI31vpZ_1QeVK2.webp&quot; alt=&quot;Application Gateway - Failed Requests&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;612&quot; height=&quot;531&quot;&gt;&lt;figcaption&gt;Application Gateway - Failed Requests&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Once we are done with adaptive card design, it’s time to move on to Logic App designer.&lt;/p&gt;
&lt;h2 id=&quot;logic-app&quot;&gt;Logic App&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#logic-app&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The only tricky part of the Logic app was to generate the rows of items. The other steps are pretty much straight forward. And the overall steps are,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/all-steps.JXyCHdi5_ZuQYaK.webp&quot; alt=&quot;All steps&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1077&quot; height=&quot;637&quot;&gt;&lt;figcaption&gt;All steps&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Let’s go through each step.&lt;/p&gt;
&lt;h3 id=&quot;1-recurrence-trigger&quot;&gt;1. Recurrence trigger&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#1-recurrence-trigger&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Configured it to trigger daily.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/1-recurrence.BugsZB5k_wmhEf.webp&quot; alt=&quot;Recurrence trigger&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;616&quot; height=&quot;193&quot;&gt;&lt;figcaption&gt;Recurrence trigger&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;2-getting-a-query-result&quot;&gt;2. Getting a query result&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2-getting-a-query-result&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For Application Insights query results, use the &lt;strong&gt;Application Insights&lt;/strong&gt; connector and action &lt;strong&gt;Run Analytics Query&lt;/strong&gt;&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/2-run-analytics-query.mEnDcN6D_Z1zEhFi.webp&quot; alt=&quot;Run Analytics Query&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;607&quot; height=&quot;407&quot;&gt;&lt;figcaption&gt;Run Analytics Query&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4 id=&quot;query-to-get-performance-metrics-from-application-insights&quot;&gt;Query to get performance metrics from Application insights&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#query-to-get-performance-metrics-from-application-insights&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;let dataset=requests&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| where timestamp &amp;gt; ago(1d);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;dataset&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| summarize count_=sum(itemCount), avg(duration), percentiles(duration, 50, 99) by operation_Name, cloud_RoleName&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| union(dataset&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| summarize count_=sum(itemCount), avg_duration=avg(duration), percentiles(duration, 50, 99)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| extend operation_Name=&amp;quot;Overall&amp;quot;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| top 30 by avg_duration desc&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;let dataset=requests| where timestamp &gt; ago(1d);dataset| summarize count_=sum(itemCount), avg(duration), percentiles(duration, 50, 99) by operation_Name, cloud_RoleName| union(dataset| summarize count_=sum(itemCount), avg_duration=avg(duration), percentiles(duration, 50, 99)| extend operation_Name=&amp;quot;Overall&amp;quot;)| top 30 by avg_duration desc&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And in case of &lt;strong&gt;Application Gateway&lt;/strong&gt; access logs, we need to use the &lt;strong&gt;Azure Monitor Logs&lt;/strong&gt; connector and it’s &lt;strong&gt;Run query and list results&lt;/strong&gt; action, details &lt;a href=&quot;https://docs.microsoft.com/en-us/connectors/azuremonitorlogs/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-logic-apps-get-application-insights-azure-monitor-logs-query-result-on-microsoft-teams#run-query-and-list-results&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/azure-monitor.C2cA5JX9_Z1ou9TT.webp&quot; alt=&quot;Run query and list results&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;607&quot; height=&quot;606&quot;&gt;&lt;figcaption&gt;Run query and list results&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;Note: &lt;strong&gt;Diagnostic setting&lt;/strong&gt; for &lt;strong&gt;Application Gateway&lt;/strong&gt; should be configured to feed access log data to the log analytics workspace before.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&quot;query-to-get-failed-requests-summary-from-application-gateway&quot;&gt;Query to get failed requests summary from Application Gateway&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#query-to-get-failed-requests-summary-from-application-gateway&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;AzureDiagnostics&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| where ResourceProvider == &amp;quot;MICROSOFT.NETWORK&amp;quot; and Category == &amp;quot;ApplicationGatewayAccessLog&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| where httpStatus_d &amp;gt;= 400&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| where TimeGenerated &amp;gt; ago(1d)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| summarize count_= count(httpStatus_d) by httpStatus_d,requestUri_s, host_s&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| order by count_ desc&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;| top 30 by count_&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;AzureDiagnostics| where ResourceProvider == &amp;quot;MICROSOFT.NETWORK&amp;quot; and Category == &amp;quot;ApplicationGatewayAccessLog&amp;quot;| where httpStatus_d &gt;= 400| where TimeGenerated &gt; ago(1d)| summarize count_= count(httpStatus_d) by httpStatus_d,requestUri_s, host_s| order by count_ desc| top 30 by count_&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;aside class=&quot;alert alert--info&quot; role=&quot;note&quot; aria-label=&quot;Info&quot;&gt; &lt;p class=&quot;alert__title&quot;&gt;&lt;span class=&quot;alert__icon&quot; aria-hidden=&quot;true&quot;&gt;ℹ&lt;/span&gt;Info&lt;/p&gt; &lt;div class=&quot;alert__body&quot;&gt;&lt;p&gt;In both queries, I am limiting the number of results since the Teams post
message action has a message size limit.&lt;/p&gt;&lt;/div&gt; &lt;/aside&gt;
&lt;h3 id=&quot;3-initialize-an-array-variable&quot;&gt;3. Initialize an array variable&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#3-initialize-an-array-variable&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since we are expecting a list of rows from the above query, to map it to rows in the Teams card message, we use this.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/3-initialize-variable.BBuhRS30_1B63Dv.webp&quot; alt=&quot;Initialize an array variable&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;617&quot; height=&quot;172&quot;&gt;&lt;figcaption&gt;Initialize an array variable&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;4-for-each-row-in-the-query-result-we-map-the-result-item-to-an-adaptive-card-row&quot;&gt;4. For each row in the query result, we map the result item to an Adaptive card row.&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#4-for-each-row-in-the-query-result-we-map-the-result-item-to-an-adaptive-card-row&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/4-for-each.qJ6gz_5I_1JsYp3.webp&quot; alt=&quot;For each&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;638&quot; height=&quot;847&quot;&gt;&lt;figcaption&gt;For each&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Here the &lt;code&gt;value&lt;/code&gt; is an array of query results from step 2.
And for each item in the array, we are appending the &lt;strong&gt;JSON object that represents the row of data in the adaptive card&lt;/strong&gt; (under the third &lt;strong&gt;Container&lt;/strong&gt; items).&lt;/p&gt;
&lt;h3 id=&quot;5-append-the-rows-to-the-rest-of-the-adaptive-card-schema-in-the-teams-connector-channel&quot;&gt;5. Append the rows to the rest of the Adaptive card schema in the Teams connector channel.&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#5-append-the-rows-to-the-rest-of-the-adaptive-card-schema-in-the-teams-connector-channel&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/5-post-message.DXw519ob_1c8evW.webp&quot; alt=&quot;Initialize an array variable&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;605&quot; height=&quot;670&quot;&gt;&lt;figcaption&gt;Initialize an array variable&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The full &lt;code&gt;Message&lt;/code&gt; is,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;AdaptiveCard&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;emphasis&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;size&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;**Performance (App Insights)**&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;bleed&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;style&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;emphasis&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ColumnSet&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;spacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Large&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Operation Name&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Count&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Column&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;weight&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bolder&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Avg&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;TextBlock&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Percentiles 50 / 99&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;width&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;horizontalAlignment&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;bleed&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;items&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;variables(&amp;#39;rows&amp;#39;)&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;separator&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;$schema&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;fallbackText&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;This card requires Adaptive Cards v1.2 support to be rendered properly.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{    &amp;quot;type&amp;quot;: &amp;quot;AdaptiveCard&amp;quot;,    &amp;quot;body&amp;quot;: [        {            &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,            &amp;quot;style&amp;quot;: &amp;quot;emphasis&amp;quot;,            &amp;quot;items&amp;quot;: [                {                    &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,                    &amp;quot;columns&amp;quot;: [                        {                            &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,                            &amp;quot;items&amp;quot;: [                                {                                    &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                                    &amp;quot;size&amp;quot;: &amp;quot;Large&amp;quot;,                                    &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                                    &amp;quot;text&amp;quot;: &amp;quot;**Performance (App Insights)**&amp;quot;                                }                            ],                            &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;                        }                    ]                }            ],            &amp;quot;bleed&amp;quot;: true        },        {            &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,            &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,            &amp;quot;style&amp;quot;: &amp;quot;emphasis&amp;quot;,            &amp;quot;items&amp;quot;: [                {                    &amp;quot;type&amp;quot;: &amp;quot;ColumnSet&amp;quot;,                    &amp;quot;columns&amp;quot;: [                        {                            &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,                            &amp;quot;spacing&amp;quot;: &amp;quot;Large&amp;quot;,                            &amp;quot;items&amp;quot;: [                                {                                    &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                                    &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                                    &amp;quot;text&amp;quot;: &amp;quot;Operation Name&amp;quot;                                }                            ],                            &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;                        },                        {                            &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,                            &amp;quot;items&amp;quot;: [                                {                                    &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                                    &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                                    &amp;quot;text&amp;quot;: &amp;quot;Count&amp;quot;                                }                            ],                            &amp;quot;width&amp;quot;: &amp;quot;auto&amp;quot;                        },                        {                            &amp;quot;type&amp;quot;: &amp;quot;Column&amp;quot;,                            &amp;quot;items&amp;quot;: [                                {                                    &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                                    &amp;quot;weight&amp;quot;: &amp;quot;Bolder&amp;quot;,                                    &amp;quot;text&amp;quot;: &amp;quot;Avg&amp;quot;,                                    &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                                },                                {                                    &amp;quot;type&amp;quot;: &amp;quot;TextBlock&amp;quot;,                                    &amp;quot;text&amp;quot;: &amp;quot;Percentiles 50 / 99&amp;quot;,                                    &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                                }                            ],                            &amp;quot;width&amp;quot;: &amp;quot;stretch&amp;quot;,                            &amp;quot;horizontalAlignment&amp;quot;: &amp;quot;Right&amp;quot;                        }                    ]                }            ],            &amp;quot;bleed&amp;quot;: true        },        {            &amp;quot;type&amp;quot;: &amp;quot;Container&amp;quot;,            &amp;quot;items&amp;quot;: @{variables(&apos;rows&apos;)},            &amp;quot;separator&amp;quot;: true        }    ],    &amp;quot;$schema&amp;quot;: &amp;quot;http://adaptivecards.io/schemas/adaptive-card.json&amp;quot;,    &amp;quot;version&amp;quot;: &amp;quot;1.2&amp;quot;,    &amp;quot;fallbackText&amp;quot;: &amp;quot;This card requires Adaptive Cards v1.2 support to be rendered properly.&amp;quot;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Notice the &lt;code&gt;@{variables(&amp;#39;rows&amp;#39;)}&lt;/code&gt;, that’s where the magic happens. So the array we prepared in the previous step gets appended here, and hence we get to see the multiple rows in the adaptive card. To understand better, cross-check the above one with the original &lt;code&gt;schema&lt;/code&gt; mentioned in the very beginning &lt;a href=&quot;#card-with-a-list-of-items&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;aside class=&quot;alert alert--info&quot; role=&quot;note&quot; aria-label=&quot;Info&quot;&gt; &lt;p class=&quot;alert__title&quot;&gt;&lt;span class=&quot;alert__icon&quot; aria-hidden=&quot;true&quot;&gt;ℹ&lt;/span&gt;Info&lt;/p&gt; &lt;div class=&quot;alert__body&quot;&gt;&lt;p&gt;The adaptive card schema version kept to 1.2 even though the latest version is
1.3 since Microsoft Teams currently does not support 1.3. That may change in
the future.&lt;/p&gt;&lt;/div&gt; &lt;/aside&gt;
&lt;p&gt;That’s all. Run the logic app and see a message popping up on Teams.&lt;/p&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Simplifying work by automating routine tasks 🧑‍💻&lt;a href=&quot;https://x.com/hashtag/azurelogicapps?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#azurelogicapps&lt;/a&gt;&lt;br&gt; + &lt;br&gt;( &lt;a href=&quot;https://x.com/hashtag/azuremonitor?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#azuremonitor&lt;/a&gt; ||  &lt;a href=&quot;https://x.com/hashtag/applicationinsights?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#applicationinsights&lt;/a&gt;) &lt;br&gt;👇&lt;br&gt; &lt;a href=&quot;https://x.com/hashtag/microsoftteams?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#microsoftteams&lt;/a&gt;&lt;a href=&quot;https://t.co/ZyZc7Kh85i&quot;&gt;https://t.co/ZyZc7Kh85i&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1330952694161432581?ref_src=twsrc%5Etfw&quot;&gt;November 23, 2020&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>azure-logic-apps</category><category>app-insights</category><category>devops</category><author>Abhith Rajan</author></item><item><title>Microsoft Clarity - Setting Up with GatsbyJS &amp; First Impressions</title><link>https://www.abhith.net/blog/microsoft-clarity-setting-up-with-gatsbyjs-and-first-impressions/</link><guid isPermaLink="true">https://www.abhith.net/blog/microsoft-clarity-setting-up-with-gatsbyjs-and-first-impressions/</guid><description>Add Microsoft Clarity analytics to the GatsbyJS website in a simple step. Also, a quick look at what Microsoft Clarity offers.</description><pubDate>Wed, 04 Nov 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’m impressed. From a long-term &lt;strong&gt;Google Analytics&lt;/strong&gt; user point, &lt;strong&gt;Clarity&lt;/strong&gt; provides more info about the actual user interactions on the website.&lt;/p&gt;
&lt;p&gt;Getting started was pretty easy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sign-up &lt;a href=&quot;https://clarity.microsoft.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=microsoft-clarity-setting-up-with-gatsbyjs-and-first-impressions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, it’s &lt;strong&gt;FREE&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Create a Clarity project for your website.&lt;/li&gt;
&lt;li&gt;Integrate with your website.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are already some direct integrations available. In my case, I have opted for the &lt;code&gt;Install tracking code manually&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;integrating-microsoft-clarity-with-gatsbyjs-website&quot;&gt;Integrating Microsoft Clarity with GatsbyJS website&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#integrating-microsoft-clarity-with-gatsbyjs-website&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;official-plugin&quot;&gt;Official plugin&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#official-plugin&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;
Navigate to the root of your Gatsby project.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;
Open your preferred command line and run one of the following commands.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;install&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;gatsby-plugin-clarity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;npm install gatsby-plugin-clarity&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;yarn&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;gatsby-plugin-clarity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;yarn add gatsby-plugin-clarity&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;
Navigate to gatsby-config.js.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;
Add the following to your plugins array&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;resolve&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`gatsby-plugin-clarity`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// String value for your clarity project ID&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;clarity_project_id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;YOUR&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;CLARITY&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;PROJECT&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Boolean value for enabling clarity while developing&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// true will enable clarity tracking code on both development and production environments&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// false will enable clarity tracking code on production environment only&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;enable_on_dev_env&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{    resolve: `gatsby-plugin-clarity`,    options: {      // String value for your clarity project ID      clarity_project_id: YOUR-CLARITY-PROJECT-ID,      // Boolean value for enabling clarity while developing      // true will enable clarity tracking code on both development and production environments      // false will enable clarity tracking code on production environment only      enable_on_dev_env: true    },}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The Clarity tracking code is now installed.&lt;/p&gt;
&lt;h3 id=&quot;legacy-way-of-installing-deprecated&quot;&gt;Legacy way of installing [DEPRECATED]&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#legacy-way-of-installing-deprecated&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It is very similar to adding &lt;strong&gt;Google AdSense&lt;/strong&gt; as described in my older post here,&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://www.abhith.net/blog/gatsbyjs-add-google-adsense/&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GatsbyJS - Add Google AdSense&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All you have to do is, update your &lt;code&gt;gatsby-ssr.js&lt;/code&gt; with the below code (if there is no &lt;code&gt;gatsby-ssr.js&lt;/code&gt; file on your project directory then create one at the root).&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;React&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;react&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;onRenderBody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; ({ &lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;setHeadComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;setPostBodyComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; }) &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;pluginOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;head: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;process&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;env&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;NODE_ENV&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`production`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;setComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;pluginOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;head&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;setHeadComponents&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;setPostBodyComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;setComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;([&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;async&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;dangerouslySetInnerHTML&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;__html: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;(function(c,l,a,r,i,t,y){&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;t=l.createElement(r);t.async=1;t.src=&amp;quot;https://www.clarity.ms/tag/&amp;quot;+i;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;})(window, document, &amp;quot;clarity&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;&amp;lt;YOUR-CLARITY-PROJECT-ID&amp;gt;&amp;quot;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;import React from &amp;quot;react&amp;quot;;export const onRenderBody = ({ setHeadComponents, setPostBodyComponents }) =&gt; {  const pluginOptions = {    head: true,  };  if (process.env.NODE_ENV !== `production`) {    return null;  }  const setComponents = pluginOptions.head    ? setHeadComponents    : setPostBodyComponents;  return setComponents([    &lt;script      async      type=&amp;quot;text/javascript&amp;quot;      dangerouslySetInnerHTML={{        __html: `      (function(c,l,a,r,i,t,y){        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};        t=l.createElement(r);t.async=1;t.src=&amp;quot;https://www.clarity.ms/tag/&amp;quot;+i;        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);    })(window, document, &amp;quot;clarity&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;&lt;YOUR-CLARITY-PROJECT-ID&gt;&amp;quot;);      `,      }}    /&gt;,  ]);};&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace &lt;code&gt;&amp;lt;YOUR-CLARITY-PROJECT-ID&amp;gt;&lt;/code&gt; with your &lt;strong&gt;Clarity&lt;/strong&gt; project ID.
The embedded script you can view at &lt;code&gt;Clarity Project &amp;gt; Settings &amp;gt; Setup &amp;gt; Install tracking code manually&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;onRenderBody&lt;/strong&gt; is a Gatsby SSR API, called after every page Gatsby server renders while building HTML so you can set head and body components to be rendered in your html.js.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://www.gatsbyjs.org/docs/ssr-apis/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=microsoft-clarity-setting-up-with-gatsbyjs-and-first-impressions#onRenderBody&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SSR APIs | GatsbyJS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Build the project (&lt;code&gt;gatsby build&lt;/code&gt;) and see whether the AdSense snippet is present in the build output HTML (&lt;code&gt;gatsby serve&lt;/code&gt;).
You can also refer to the same used in my repo itself.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.com/abhith/abhith.net/blob/master/gatsby-ssr.js&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;abhith/abhith.net&lt;/a&gt;&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Once you have done the integrations and if the site is live, after a few minutes you will start seeing the metrics getting populated in the &lt;strong&gt;Clarity Dashboard&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;dashboard&quot;&gt;Dashboard&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dashboard&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It is pretty clean and minimal. And it looks like,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/dashboard.C2oEreSB_Hy1i6.webp&quot; alt=&quot;Dashboard&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1838&quot; height=&quot;1451&quot;&gt;&lt;figcaption&gt;Dashboard&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;recordings&quot;&gt;Recordings&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#recordings&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It’s a dope feature. Exactly what each user did, like actual screencast of user interactions on that page with clicks and all. There is a sound indication for mouse clicks as well, Nice.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/recordings.Bl3CYzXL_Z1pl2AF.webp&quot; alt=&quot;Recordings&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1901&quot; height=&quot;936&quot;&gt;&lt;figcaption&gt;Recordings&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It will help website managers to understand how the user is interacting with each element/section on the web page.&lt;/p&gt;
&lt;p&gt;Also, sensitive data masking and other privacy concern are taken care of by &lt;strong&gt;Clarity&lt;/strong&gt; automatically.&lt;/p&gt;
&lt;h2 id=&quot;heatmaps&quot;&gt;Heatmaps&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#heatmaps&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As the name suggests, most interacted areas will be visualized here.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/click-heatmap.BGzU3iWG_Z1V5fMC.webp&quot; alt=&quot;Heatmaps&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;947&quot;&gt;&lt;figcaption&gt;Heatmaps&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If you are concerned about the data it collects, privacy, etc, one fact is that it is an opensource project. So you can have a look at it,&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.com/microsoft/clarity?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=microsoft-clarity-setting-up-with-gatsbyjs-and-first-impressions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GitHub-microsoft/clarity&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’m impressed with &lt;strong&gt;Microsoft Clarity&lt;/strong&gt;. It’s not(yet) a replacement for &lt;strong&gt;Google Analytics&lt;/strong&gt;, but I would recommend you to try it out and see how you can make use of it.&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/clarity/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=microsoft-clarity-setting-up-with-gatsbyjs-and-first-impressions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Clarity Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Microsoft Clarity - I&amp;#39;m impressed&lt;br&gt; &lt;a href=&quot;https://t.co/JqYbcIZlwz&quot;&gt;https://t.co/JqYbcIZlwz&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/Analytics?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Analytics&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/MicrosoftClarity?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#MicrosoftClarity&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1323728937831305220?ref_src=twsrc%5Etfw&quot;&gt;November 3, 2020&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>analytics</category><author>Abhith Rajan</author></item><item><title>Azure Application Gateway - List of Failed Requests</title><link>https://www.abhith.net/blog/azure-application-gateway-list-of-failed-requests/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-application-gateway-list-of-failed-requests/</guid><description>Get an insight about the failed requests in the Azure Application Gateway.</description><pubDate>Sat, 19 Sep 2020 15:11:27 GMT</pubDate><content:encoded>&lt;p&gt;Azure application gateway serves an important role in our infrastructure. All the public inbound traffic happening through Application Gateway.&lt;/p&gt;
&lt;p&gt;Part of monitoring, a year ago, I asked the following question in &lt;a href=&quot;https://stackoverflow.com/questions/57369646/list-of-failed-requests-in-azure-application-gateway?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-application-gateway-list-of-failed-requests&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SO&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;“We can see the failed request count in Azure application gateway but how can we see the list of failed requests in the Logs section?
All the logs enabled in Diagnostics settings of Application Gateway.
We need to see at least the requested path (URL) and the response code for the failed requests in the Logs section in the Application Gateway.
Because of the way access log stored in the storage account (folder structure), it is a bit difficult to access the required data through the storage account.”&lt;/p&gt;
&lt;p&gt;At that time there was no good solution for that. But that changed.&lt;/p&gt;
&lt;h2 id=&quot;list-of-failed-requests&quot;&gt;List of failed requests&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#list-of-failed-requests&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;AzureDiagnostics&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; ResourceProvider &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;MICROSOFT.NETWORK&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; Category &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ApplicationGatewayAccessLog&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; httpStatus_d &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;400&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| project httpStatus_d, requestUri_s, TimeGenerated&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;AzureDiagnostics| where ResourceProvider == &amp;quot;MICROSOFT.NETWORK&amp;quot; and Category == &amp;quot;ApplicationGatewayAccessLog&amp;quot;| where httpStatus_d &gt;= 400| project httpStatus_d, requestUri_s, TimeGenerated&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/azure-application-gateway-list-of-failed-requests_censored.mnKnR1Tb_2oLYrb.webp&quot; alt=&quot;List of failed requests&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1009&quot; height=&quot;829&quot;&gt;&lt;figcaption&gt;List of failed requests&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Also, you can include other fields like &lt;code&gt;host_s&lt;/code&gt; in the query which will be useful if you have multiple domains configured in the Application Gateway.&lt;/p&gt;
&lt;p&gt;You can do much more with the data. In our case, we added a widget to our Azure dashboard where it displays the summary of failed requests per hour. And the query for the same given below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;AzureDiagnostics&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; ResourceProvider &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;MICROSOFT.NETWORK&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; Category &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ApplicationGatewayAccessLog&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; httpStatus_d &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;400&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| summarize &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;count&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(httpStatus_d) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; httpStatus_d,requestUri_s, bin(TimeGenerated, 1h)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;order by&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; count_httpStatus_d &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;desc&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| project httpStatus_d, requestUri_s, TimeGenerated, count_httpStatus_d&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;AzureDiagnostics| where ResourceProvider == &amp;quot;MICROSOFT.NETWORK&amp;quot; and Category == &amp;quot;ApplicationGatewayAccessLog&amp;quot;| where httpStatus_d &gt;= 400| summarize count(httpStatus_d) by httpStatus_d,requestUri_s, bin(TimeGenerated, 1h)| order by count_httpStatus_d desc| project httpStatus_d, requestUri_s, TimeGenerated, count_httpStatus_d&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And the result looks like (highlighted one),&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/application-gateway-dashboard_censored.BwnChWRg_Z1g0AT7.webp&quot; alt=&quot;Application Gateway Azure Dashboard&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1905&quot; height=&quot;1047&quot;&gt;&lt;figcaption&gt;Application Gateway Azure Dashboard&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In fact, Azure made all this easy. When you navigate to the logs section of application gateway, the example queries by default include a similar query,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/application-gateway-logs.CrY8xNlW_Z4mu5e.webp&quot; alt=&quot;Application Gateway Logs&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1672&quot; height=&quot;725&quot;&gt;&lt;figcaption&gt;Application Gateway Logs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; Errors &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; URI&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; of errors &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; URI.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;AzureDiagnostics&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; ResourceType &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;APPLICATIONGATEWAYS&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; OperationName &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ApplicationGatewayAccess&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; httpStatus_d &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;399&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| summarize AggregatedValue &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;count&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; requestUri_s&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;| sort &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; AggregatedValue &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;desc&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;// Errors by URI// Number of errors by URI.AzureDiagnostics| where ResourceType == &amp;quot;APPLICATIONGATEWAYS&amp;quot; and OperationName == &amp;quot;ApplicationGatewayAccess&amp;quot; and httpStatus_d &gt; 399| summarize AggregatedValue = count() by requestUri_s| sort by AggregatedValue desc&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>azure-application-gateway</category><category>monitoring</category><author>Abhith Rajan</author></item><item><title>Azure DevOps - CI/CD Pipeline involving Helm 3, ACR &amp; AKS</title><link>https://www.abhith.net/blog/azure-devops-ci-cd-pipeline-involving-helm-3-acr-aks/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-devops-ci-cd-pipeline-involving-helm-3-acr-aks/</guid><description>Setup Continuous Integration in Azure DevOps which push Docker image, Helm 3 chart to ACR, and Continuous Deployment pipeline that deploys the chart to AKS.</description><pubDate>Tue, 18 Aug 2020 15:11:27 GMT</pubDate><content:encoded>&lt;p&gt;Azure is my favorite cloud provider. We use &lt;a href=&quot;https://www.abhith.net/topics/azure/&quot;&gt;Azure&lt;/a&gt; for most of the infra &amp;amp; services.
Our code goes to &lt;a href=&quot;https://www.abhith.net/topics/azure-devops/&quot;&gt;Azure DevOps&lt;/a&gt;, we use &lt;strong&gt;Azure Container Registry (ACR)&lt;/strong&gt; to host our docker container images and our &lt;a href=&quot;https://www.abhith.net/topics/kubernetes/&quot;&gt;Kubernetes&lt;/a&gt; clusters running in &lt;a href=&quot;https://www.abhith.net/topics/aks/&quot;&gt;Azure Kubernetes Service (AKS)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We configured the CI/CD pipelines in Azure DevOps.
In my case, we have a &lt;strong&gt;monorepo&lt;/strong&gt; that contains several &lt;a href=&quot;https://www.abhith.net/topics/aspnet-core/&quot;&gt;ASP.NET Core&lt;/a&gt; &lt;a href=&quot;https://www.abhith.net/topics/microservices/&quot;&gt;microservices&lt;/a&gt; and the folder structure looks like below, which we inherited from &lt;a href=&quot;https://github.com/dotnet-architecture/eShopOnContainers?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-ci-cd-pipeline-involving-helm-3-acr-aks&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;eShopOnContainers&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- build&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- azure-devops&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- common&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- ci-steps-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- ci-vars-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- project-one&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- ci-pipeline.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- project-two&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- deploy&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- azure-devops&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- common&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- cd-steps-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- cd-steps-template-prod.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- cd-vars-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- project-one&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- cd-pipeline.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- project-two&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- k8s&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- helm&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- project-one&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- project-two&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- src&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- Services&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- Project-One&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;- Project-Two&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;- build  - azure-devops    - common      - ci-steps-template.yml      - ci-vars-template.yml    - project-one      - ci-pipeline.yml    - project-two- deploy  - azure-devops    - common      - cd-steps-template.yml      - cd-steps-template-prod.yml      - cd-vars-template.yml    - project-one      - cd-pipeline.yml    - project-two  - k8s    - helm      - project-one      - project-two- src  - Services    - Project-One    - Project-Two&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;One of the great articles that helped me to initial setup the CI/CD is given below.
Its kind of outdated now since it is using &lt;code&gt;az acr helm&lt;/code&gt; commands which were deprecated later.
But it is still worth reading. So definitely check it out.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://cloudblogs.microsoft.com/opensource/2018/11/27/tutorial-azure-devops-setup-cicd-pipeline-kubernetes-docker-helm/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-ci-cd-pipeline-involving-helm-3-acr-aks&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Tutorial: Using Azure DevOps to setup a CI/CD pipeline and deploy to Kubernetes&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;ci-pipeline&quot;&gt;CI Pipeline&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ci-pipeline&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The CI pipeline does the following,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build a Docker image and push to ACR&lt;/li&gt;
&lt;li&gt;Build Helm chart and push to ACR&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#prerequisites&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.abhith.net/topics/helm/&quot;&gt;Helm&lt;/a&gt; chart for your project. Here my chart directory is located at &lt;code&gt;deploy &amp;gt; k8s &amp;gt; helm&lt;/code&gt;. To create a new chart for your project, refer &lt;a href=&quot;https://helm.sh/docs/helm/helm_create/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-ci-cd-pipeline-involving-helm-3-acr-aks&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Helm Create&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;acr-connection-name&lt;/strong&gt;: ACR service connection in Azure DevOps. You can add it under &lt;code&gt;Azure DevOps &amp;gt; Project &amp;gt; Project Settings &amp;gt; Service Connections&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The ACR credentials I stored in the Azure DevOps &lt;strong&gt;Variable Groups&lt;/strong&gt; (acr-variable-group).&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;registryName&lt;/td&gt;&lt;td&gt;Your ACR name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;registryLogin&lt;/td&gt;&lt;td&gt;ACR login&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;registryPassword&lt;/td&gt;&lt;td&gt;ACR password&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/azure-devops-library.H3juRHok_sIAJH.webp&quot; alt=&quot;Variable group definition&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1199&quot; height=&quot;716&quot;&gt;&lt;figcaption&gt;Variable group definition&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;common&quot;&gt;Common&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#common&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;ci-vars-templateyml&quot;&gt;ci-vars-template.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ci-vars-templateyml&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;parameters&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projectName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerRegistryServiceConnectionName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;buildContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmVersion&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;3.2.3&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;HELM_EXPERIMENTAL_OCI&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;registryServerName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;$(registryName).azurecr.io&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerRegistryServiceConnectionName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;${{ parameters.dockerRegistryServiceConnectionName }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;${{ parameters.dockerfile }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;buildContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;${{ parameters.buildContext }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projectName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;${{ parameters.projectName }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;imageName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;${{ parameters.projectName }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;imageTag&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(build.sourceBranchName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmChartVersion&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(build.sourceBranchName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmfrom&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(Build.SourcesDirectory)/deploy/k8s/helm&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(Build.ArtifactStagingDirectory)/deploy/k8s/helm&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;parameters:  projectName: &amp;quot;&amp;quot;  dockerRegistryServiceConnectionName: &amp;quot;&amp;quot;  dockerfile: &amp;quot;&amp;quot;  buildContext: &amp;quot;&amp;quot;variables:  helmVersion: 3.2.3  HELM_EXPERIMENTAL_OCI: 1  registryServerName: &amp;quot;$(registryName).azurecr.io&amp;quot;  dockerRegistryServiceConnectionName: ${{ parameters.dockerRegistryServiceConnectionName }}  dockerfile: ${{ parameters.dockerfile }}  buildContext: ${{ parameters.buildContext }}  projectName: ${{ parameters.projectName }}  imageName: ${{ parameters.projectName }}  imageTag: $(build.sourceBranchName)  helmChartVersion: $(build.sourceBranchName)  helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm  helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Few things to note here,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;HELM_EXPERIMENTAL_OCI&lt;/code&gt; is to enable OCI support in the Helm 3 client. Currently, this support is experimental.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;build.sourceBranchName&lt;/code&gt; as the image tag and chart version is handy if you are following &lt;strong&gt;Gitflow&lt;/strong&gt; (which we follow) or similar &lt;a href=&quot;https://www.abhith.net/topics/git/&quot;&gt;git&lt;/a&gt; branching convention, so each release (eg, refs/tags/project-one/2.2.6) will generate &lt;a href=&quot;https://www.abhith.net/topics/docker/&quot;&gt;Docker&lt;/a&gt; image and Helm chart with the same version.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;ci-steps-templateyml&quot;&gt;ci-steps-template.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ci-steps-templateyml&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Docker@2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Build and push an image to container registry&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;command&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;buildAndPush&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;repository&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(imageName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(dockerfile)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;containerRegistry&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(dockerRegistryServiceConnectionName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;buildContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(buildContext)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tags&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(imageTag)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;HelmInstaller@1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;install helm&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmVersionToInstall&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(helmVersion)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;echo $(registryPassword) | helm registry login $(registryName).azurecr.io --username $(registryLogin) --password-stdin&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;cd deploy/k8s/helm/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm chart save $(helm package --app-version $(imageTag) --version $(helmChartVersion) ./$(projectName) | grep -o &amp;#39;/.*.tgz&amp;#39;) $(registryName).azurecr.io/charts/$(projectName):$(imageTag)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm chart push $(registryName).azurecr.io/charts/$(projectName):$(helmChartVersion)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;echo $(jq -n --arg version &amp;quot;$(helmChartVersion)&amp;quot; &amp;#39;{helmChartVersion: $version}&amp;#39;) &amp;gt; $(build.artifactStagingDirectory)/variables.json&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;failOnStderr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;helm package&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;CopyFiles@2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;sourceFolder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(helmfrom)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;targetFolder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(helmto)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;publish&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(build.artifactStagingDirectory)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;artifact&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build-artifact&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;steps:  - task: Docker@2    displayName: Build and push an image to container registry    inputs:      command: buildAndPush      repository: $(imageName)      dockerfile: $(dockerfile)      containerRegistry: $(dockerRegistryServiceConnectionName)      buildContext: $(buildContext)      tags: |        $(imageTag)  - task: HelmInstaller@1    displayName: &amp;quot;install helm&amp;quot;    inputs:      helmVersionToInstall: $(helmVersion)  - bash: |      echo $(registryPassword) | helm registry login $(registryName).azurecr.io --username $(registryLogin) --password-stdin      cd deploy/k8s/helm/      helm chart save $(helm package --app-version $(imageTag) --version $(helmChartVersion) ./$(projectName) | grep -o &apos;/.*.tgz&apos;) $(registryName).azurecr.io/charts/$(projectName):$(imageTag)      helm chart push $(registryName).azurecr.io/charts/$(projectName):$(helmChartVersion)      echo $(jq -n --arg version &amp;quot;$(helmChartVersion)&amp;quot; &apos;{helmChartVersion: $version}&apos;) &gt; $(build.artifactStagingDirectory)/variables.json    failOnStderr: true    displayName: &amp;quot;helm package&amp;quot;  - task: CopyFiles@2    inputs:      sourceFolder: $(helmfrom)      targetFolder: $(helmto)  - publish: $(build.artifactStagingDirectory)    artifact: build-artifact&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The steps in the CI pipeline we moved to a common template file &lt;code&gt;ci-steps-template.yml&lt;/code&gt; so that we can reuse it on other pipelines as well, and the steps include,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Build and push the docker image&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Installs Helm client&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A series of script which does&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Authenticate to ACR&lt;/li&gt;
&lt;li&gt;Creates and push Helm chart to ACR.&lt;/li&gt;
&lt;li&gt;Creates &lt;code&gt;variables.json&lt;/code&gt; which contain the newly created Helm chart version. Which we will use to fetch the right chart version during CD.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy some additional files to the artifact. Which we can use to override Helm chart values.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;ci-pipelineyml&quot;&gt;ci-pipeline.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ci-pipelineyml&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;trigger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;branches&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;refs/tags/project-one/*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;paths&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;src/Services/ProjectOne/*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;none&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pool&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;vmImage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ubuntu-latest&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;group&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;acr-variable-group&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;../common/ci-vars-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;parameters&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projectName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;project-one&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerRegistryServiceConnectionName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;acr-connection-name&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;src/Services/Project-One/Dockerfile&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;buildContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;$(System.DefaultWorkingDirectory)&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;../common/ci-steps-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;trigger:  branches:    include:      - refs/tags/project-one/*  paths:    include:      - src/Services/ProjectOne/*pr: nonepool:  vmImage: &amp;quot;ubuntu-latest&amp;quot;variables:  - group: acr-variable-group  - template: ../common/ci-vars-template.yml    parameters:      projectName: &amp;quot;project-one&amp;quot;      dockerRegistryServiceConnectionName: &amp;quot;acr-connection-name&amp;quot;      dockerfile: &amp;quot;src/Services/Project-One/Dockerfile&amp;quot;      buildContext: &amp;quot;$(System.DefaultWorkingDirectory)&amp;quot;steps:  - template: ../common/ci-steps-template.yml&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If everything went well, you will have two repositories under your ACR.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;project-one&lt;/strong&gt; which contains the Docker image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;chart/project-one&lt;/strong&gt; for the Helm chart&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;h2 id=&quot;cd-pipeline&quot;&gt;CD Pipeline&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cd-pipeline&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The CD pipeline will install the Helm chart on AKS.
The CD pipeline stage requires following details,&lt;/p&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;aks&lt;/td&gt;&lt;td&gt;AKS name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;rg&lt;/td&gt;&lt;td&gt;AKS resource group&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;aksSpTenantId&lt;/td&gt;&lt;td&gt;Subscription tenant id&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;aksSpId&lt;/td&gt;&lt;td&gt;Service principal Id&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;aksSpSecret&lt;/td&gt;&lt;td&gt;Service principal password&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;These credentials I stored in another varible group named &lt;code&gt;aks-variable-group&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;helpful-commands&quot;&gt;Helpful commands&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#helpful-commands&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;service-principal-credentials&quot;&gt;Service principal credentials&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#service-principal-credentials&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Create new service principal &lt;code&gt;aks-name-deploy&lt;/code&gt; by&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;az&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ad&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;sp&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;create-for-rbac&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-n&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;aks-name-deploy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--scopes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;aks-resource-id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--role&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Azure Kubernetes Service Cluster User Role&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--query&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;password&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tsv&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;az ad sp create-for-rbac -n aks-name-deploy --scopes aks-resource-id --role &amp;quot;Azure Kubernetes Service Cluster User Role&amp;quot; --query password -o tsv&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Where &lt;code&gt;aks-resource-id&lt;/code&gt; is,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;az&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;aks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-n&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$aks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-g&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$rg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--query&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tsv&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;az aks show -n $aks -g $rg --query id -o tsv&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The above command will output service principal password &lt;code&gt;aksSpSecret&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To get service principal id &lt;code&gt;aksSpId&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;az&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ad&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;sp&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;http://aks-name-deploy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--query&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;appId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tsv&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;az ad sp show --id http://aks-name-deploy --query appId -o tsv&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Also we need to attach ACR with AKS so that AKS can pull our private docker images from our ACR.&lt;/p&gt;
&lt;h4 id=&quot;attach-acr-with-aks&quot;&gt;Attach ACR with AKS&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#attach-acr-with-aks&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;az&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;aks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;update&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-g&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$rg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-n&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$aks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--attach-acr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;acr-resource-id&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;az aks update -g $rg -n $aks --attach-acr acr-resource-id&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Where &lt;code&gt;acr-resource-id&lt;/code&gt; is the output of,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;az&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;acr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-n&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$registryName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-g&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;acr-resource-group-name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--query&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tsv&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;az acr show -n $registryName -g acr-resource-group-name --query id -o tsv&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;get-azure-tenant-id&quot;&gt;Get Azure Tenant Id&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#get-azure-tenant-id&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To get tenantId &lt;code&gt;aksSpTenantId&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;az&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;account&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--query&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tenantId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tsv&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;az account show --query tenantId -o tsv&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Now lets explore the pipeline YAML files.&lt;/p&gt;
&lt;h3 id=&quot;common-1&quot;&gt;Common&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#common-1&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;cd-vars-templateyml&quot;&gt;cd-vars-template.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cd-vars-templateyml&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;parameters&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projectName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmVersion&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;3.2.3&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;HELM_EXPERIMENTAL_OCI&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;registryServerName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;$(registryName).azurecr.io&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projectName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;${{ parameters.projectName }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;parameters:  projectName: &amp;quot;&amp;quot;variables:  helmVersion: 3.2.3  HELM_EXPERIMENTAL_OCI: 1  registryServerName: &amp;quot;$(registryName).azurecr.io&amp;quot;  projectName: ${{ parameters.projectName }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;cd-steps-templateyml&quot;&gt;cd-steps-template.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cd-steps-templateyml&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;checkout&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;none&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;HelmInstaller@1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;install helm&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmVersionToInstall&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(helmVersion)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;download&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ci-pipeline&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;artifact&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build-artifact&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;az login \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--service-principal \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-u $(aksSpId) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-p &amp;#39;$(aksSpSecret)&amp;#39; \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--tenant $(aksSpTenantId)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;az aks get-credentials \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-n $(aks) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-g $(rg)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;echo $(registryPassword) | helm registry login $(registryServerName) --username $(registryLogin) --password-stdin&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helmChartVersion=$(jq .helmChartVersion $(pipeline.workspace)/ci-pipeline/build-artifact/variables.json -r)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm chart pull $(registryServerName)/charts/$(projectName):$helmChartVersion&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm chart export $(registryServerName)/charts/$(projectName):$helmChartVersion --destination $(pipeline.workspace)/install&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm upgrade \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--namespace $(k8sNamespace) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--create-namespace \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--install \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--wait \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--version $helmChartVersion \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--set image.repository=$(registryServerName)/$(projectName) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/app.yaml \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/inf.yaml \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(projectName) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(pipeline.workspace)/install/$(projectName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;failOnStderr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;deploy helm chart&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;steps:  - checkout: none  - task: HelmInstaller@1    displayName: &amp;quot;install helm&amp;quot;    inputs:      helmVersionToInstall: $(helmVersion)  - download: ci-pipeline    artifact: build-artifact  - bash: |      az login \           --service-principal \           -u $(aksSpId) \           -p &apos;$(aksSpSecret)&apos; \           --tenant $(aksSpTenantId)       az aks get-credentials \           -n $(aks) \           -g $(rg)       echo $(registryPassword) | helm registry login $(registryServerName) --username $(registryLogin) --password-stdin       helmChartVersion=$(jq .helmChartVersion $(pipeline.workspace)/ci-pipeline/build-artifact/variables.json -r)       helm chart pull $(registryServerName)/charts/$(projectName):$helmChartVersion       helm chart export $(registryServerName)/charts/$(projectName):$helmChartVersion --destination $(pipeline.workspace)/install       helm upgrade \           --namespace $(k8sNamespace) \           --create-namespace \           --install \           --wait \           --version $helmChartVersion \           --set image.repository=$(registryServerName)/$(projectName) \           -f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/app.yaml \           -f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/inf.yaml \           $(projectName) \           $(pipeline.workspace)/install/$(projectName)    failOnStderr: true    displayName: &amp;quot;deploy helm chart&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The common CD steps include a series of script which does,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Authenticate to Azure using the service principal credentials&lt;/li&gt;
&lt;li&gt;Set the specified AKS cluster as the context.&lt;/li&gt;
&lt;li&gt;Authenticate ACR with the ACR credentials (The same credentials we used in CI pipeline defined in the &lt;code&gt;acr-variable-group&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Extract the Helm chart version that need to install&lt;/li&gt;
&lt;li&gt;Pulls the Helm chart and installs (or upgrade) it. Here we are overriding the chart image repository to our ACR repository and some additional common values (app.yaml &amp;amp; inf.yaml).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;cd-pipelineyml&quot;&gt;cd-pipeline.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cd-pipelineyml&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;trigger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;none&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;none&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# define variables: registryName, registryLogin and registryPassword in the Azure pipeline UI definition&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;group&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;acr-variable-group&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;../common/cd-vars-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;parameters&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projectName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;project-one&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;k8sNamespace&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;myteam&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;resources&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pipelines&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pipeline&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ci-pipeline&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;project-one-ci&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;trigger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;enabled&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;branches&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;refs/tags/project-one/*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# define 5 variables: aks, rg, aksSpId, aksSpSecret and aksSpTenantId in the Azure pipeline UI definition&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;stages&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;stage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;deployment&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;group&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;aks-variable-group&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;deploy helm chart into AKS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pool&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;vmImage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;environment&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;test-$(projectName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;strategy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;runOnce&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;deploy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;../common/cd-steps-template.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;stage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;production&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;production&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;deployment&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;production&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;group&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;aks-prod-variable-group&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;deploy helm chart into AKS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pool&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;vmImage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;environment&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;production-$(projectName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;strategy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;runOnce&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;deploy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;../common/cd-steps-template-prod.yml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;trigger: nonepr: none# define variables: registryName, registryLogin and registryPassword in the Azure pipeline UI definitionvariables:  - group: acr-variable-group  - template: ../common/cd-vars-template.yml    parameters:      projectName: &amp;quot;project-one&amp;quot;  - name: k8sNamespace    value: myteamresources:  pipelines:    - pipeline: ci-pipeline      source: &amp;quot;project-one-ci&amp;quot;      trigger:        enabled: true        branches:          include:            - refs/tags/project-one/*# define 5 variables: aks, rg, aksSpId, aksSpSecret and aksSpTenantId in the Azure pipeline UI definitionstages:  - stage: test    displayName: test    jobs:      - deployment: test        variables:          - group: aks-variable-group        displayName: deploy helm chart into AKS        pool:          vmImage: ubuntu-latest        environment: test-$(projectName)        strategy:          runOnce:            deploy:              steps:                - template: ../common/cd-steps-template.yml  - stage: production    displayName: production    jobs:      - deployment: production        variables:          - group: aks-prod-variable-group        displayName: deploy helm chart into AKS        pool:          vmImage: ubuntu-latest        environment: production-$(projectName)        strategy:          runOnce:            deploy:              steps:                - template: ../common/cd-steps-template-prod.yml&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the CD pipeline above, I have defined two stages, one for TEST and one for PROD.
The main difference between them is in the variable group used.
&lt;code&gt;aks-variable-group&lt;/code&gt; has the TEST cluster values and you guessed right, &lt;code&gt;aks-prod-variable-group&lt;/code&gt; has the PROD cluster values.
And the difference between &lt;code&gt;cd-steps-template.yml&lt;/code&gt; and &lt;code&gt;cd-steps-template-prod.yml&lt;/code&gt; is that prod file has some additional chart value overrides with respect to our PRODUCTION environment.&lt;/p&gt;
&lt;h3 id=&quot;cd-steps-template-prodyml&quot;&gt;cd-steps-template-prod.yml&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cd-steps-template-prodyml&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;checkout&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;none&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;HelmInstaller@1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;install helm&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;helmVersionToInstall&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(helmVersion)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;download&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ci-pipeline&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;artifact&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build-artifact&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;az login \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--service-principal \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-u $(aksSpId) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-p &amp;#39;$(aksSpSecret)&amp;#39; \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--tenant $(aksSpTenantId)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;az aks get-credentials \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-n $(aks) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-g $(rg)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;echo $(registryPassword) | helm registry login $(registryServerName) --username $(registryLogin) --password-stdin&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helmChartVersion=$(jq .helmChartVersion $(pipeline.workspace)/ci-pipeline/build-artifact/variables.json -r)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm chart pull $(registryServerName)/charts/$(projectName):$helmChartVersion&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm chart export $(registryServerName)/charts/$(projectName):$helmChartVersion --destination $(pipeline.workspace)/install&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;helm upgrade \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--namespace $(k8sNamespace) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--create-namespace \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--install \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--wait \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--version $helmChartVersion \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;--set image.repository=$(registryServerName)/$(projectName) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/app.yaml \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/inf.yaml \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/inf-prod.yaml \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;-f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/$(projectName)/values-prod.yaml \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(projectName) \&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$(pipeline.workspace)/install/$(projectName)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;failOnStderr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;deploy helm chart&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;steps:  - checkout: none  - task: HelmInstaller@1    displayName: &amp;quot;install helm&amp;quot;    inputs:      helmVersionToInstall: $(helmVersion)  - download: ci-pipeline    artifact: build-artifact  - bash: |      az login \           --service-principal \           -u $(aksSpId) \           -p &apos;$(aksSpSecret)&apos; \           --tenant $(aksSpTenantId)       az aks get-credentials \           -n $(aks) \           -g $(rg)       echo $(registryPassword) | helm registry login $(registryServerName) --username $(registryLogin) --password-stdin       helmChartVersion=$(jq .helmChartVersion $(pipeline.workspace)/ci-pipeline/build-artifact/variables.json -r)       helm chart pull $(registryServerName)/charts/$(projectName):$helmChartVersion       helm chart export $(registryServerName)/charts/$(projectName):$helmChartVersion --destination $(pipeline.workspace)/install       helm upgrade \           --namespace $(k8sNamespace) \           --create-namespace \           --install \           --wait \           --version $helmChartVersion \           --set image.repository=$(registryServerName)/$(projectName) \           -f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/app.yaml \           -f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/inf.yaml \           -f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/inf-prod.yaml \           -f $(pipeline.workspace)/ci-pipeline/build-artifact/deploy/k8s/helm/$(projectName)/values-prod.yaml \           $(projectName) \           $(pipeline.workspace)/install/$(projectName)    failOnStderr: true    displayName: &amp;quot;deploy helm chart&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Few more Notes&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CD pipeline is also &lt;strong&gt;YAML&lt;/strong&gt; based (You gonna like it), hence create it like a regular pipeline (Not as RELEASE) in the Azure DevOps, and choose the &lt;code&gt;cd-pipeline.yml&lt;/code&gt; after choosing to create pipeline based on &lt;strong&gt;Existing Azure Pipelines YAML file&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Once you create the CD pipeline, check the &lt;strong&gt;Environments&lt;/strong&gt; under Azure DevOps Pipelines. There will be two environments as per the above example, test-project-one and production-project-one. Inside each, you can configure the approvals and more for the respective CD stages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A sample reference source code is also pushed to &lt;a href=&quot;https://github.com/abhith/abhith.net/tree/master/samples/azure-devops-ci-cd-pipeline-involving-helm-3-acr-aks&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you have any grey area in this article, feel free to shoot it in the comments below 👇, I will try to shed some light on that part.&lt;/p&gt;
&lt;hr/&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Setup Continuous Integration in Azure DevOps which push Docker image, Helm 3 chart to Azure Container Registry(ACR), and Continuous Deployment pipeline that deploys the chart to Azure Kubernetes Service (AKS).&lt;a href=&quot;https://t.co/S96mzQXn4M&quot;&gt;https://t.co/S96mzQXn4M&lt;/a&gt;&lt;a href=&quot;https://x.com/hashtag/AzureDevOps?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#AzureDevOps&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/helm?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#helm&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/Kubernetes?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Kubernetes&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1296763029850333184?ref_src=twsrc%5Etfw&quot;&gt;August 21, 2020&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;</content:encoded><category>azure-devops</category><category>aks</category><category>helm</category><author>Abhith Rajan</author></item><item><title>Cloudflare and AspNet Boilerplate</title><link>https://www.abhith.net/blog/cloudflare-and-aspnet-boilerplate/</link><guid isPermaLink="true">https://www.abhith.net/blog/cloudflare-and-aspnet-boilerplate/</guid><description>If you are facing any issue which involves cloudflare and request with header contains &quot;dot&quot;, have a look.</description><pubDate>Sat, 18 Jul 2020 11:26:00 GMT</pubDate><content:encoded>&lt;p&gt;I am an early adopter of &lt;a href=&quot;https://aspnetboilerplate.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt;. I learned &lt;strong&gt;AngularJS&lt;/strong&gt; as part of developing &lt;a href=&quot;https://aspnetboilerplate.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt; project and it all started by reading an awesome blog post &lt;a href=&quot;https://www.codeproject.com/Articles/768664/Introduction-to-ASP-NET-Boilerplate?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Introduction to ASP.NET Boilerplate&lt;/a&gt; by &lt;strong&gt;Halil ibrahim Kalkan&lt;/strong&gt;. Since then I always recommended using the paid &lt;a href=&quot;https://aspnetzero.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetzero&lt;/a&gt; template for all the major projects in my workplace. And I used the free &lt;a href=&quot;https://aspnetboilerplate.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt; template for some of the projects including my side project, &lt;a href=&quot;https://github.com/piggyvault/piggyvault?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;piggyvault&lt;/a&gt;, a family finance management app, and its APIs is built on &lt;a href=&quot;https://github.com/aspnetboilerplate/aspnetboilerplate?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Similarly, I use &lt;a href=&quot;https://www.cloudflare.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Cloudflare&lt;/a&gt; for most of the hosted websites as a firewall-cum-CDN. Recently after hosting the &lt;a href=&quot;https://aspnetboilerplate.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt; project on &lt;a href=&quot;https://www.smarterasp.net/index?r=100571651&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmarterASP.net&lt;/a&gt;, I started to face a login issue where it was working fine on local (as always 😆). The traffic to the PROD app was routed via &lt;a href=&quot;https://www.cloudflare.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Cloudflare&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Later the troubleshooting journey ended up &lt;a href=&quot;https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers-?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cloudflare strips any header that contains dots (.) from origin web server responses. For example, the origin web server header test.header:data is removed by Cloudflare’s proxy.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By default, ABP uses &lt;code&gt;Abp.TenantId&lt;/code&gt; header as the &lt;code&gt;TenantIdResolveKey&lt;/code&gt;, and &lt;strong&gt;Cloudflare&lt;/strong&gt; strips it resulting in null value always. Thankfully, &lt;a href=&quot;https://aspnetboilerplate.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt; provides an option to change the &lt;code&gt;TenantIdResolveKey&lt;/code&gt;. To change,&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;CoreModule&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Enable this line to create a multi-tenant application.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;MultiTenancy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;IsEnabled&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;PiggyvaultConsts&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;MultiTenancyEnabled&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;MultiTenancy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;TenantIdResolveKey&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Piggy-TenantId&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// your key without &amp;quot;.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;// Enable this line to create a multi-tenant application.Configuration.MultiTenancy.IsEnabled = PiggyvaultConsts.MultiTenancyEnabled;Configuration.MultiTenancy.TenantIdResolveKey = &amp;quot;Piggy-TenantId&amp;quot;; // your key without &amp;quot;.&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It resolved the login issue.&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3275?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Can not get header with name “Abp.TenantId” but “AbpTenantId” on server(windwos / linux).&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4349?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=cloudflare-and-aspnet-boilerplate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Allow to configure TenantIdResolveKey&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>cloudflare</category><category>abp</category><author>Abhith Rajan</author></item><item><title>ASP.NET Core - Using Mutliple Authentication Schemes</title><link>https://www.abhith.net/blog/aspnet-core-using-multiple-authentication-schemes/</link><guid isPermaLink="true">https://www.abhith.net/blog/aspnet-core-using-multiple-authentication-schemes/</guid><description>One endpoint, authorize using Identity Server or using a custom authentication handler.</description><pubDate>Sat, 11 Jul 2020 19:26:00 GMT</pubDate><content:encoded>&lt;p&gt;In some use cases, you might want your endpoints to be authorized using multiple schemes.
In my case, I had to allow some of the endpoints for authorized clients (using Identity Server) as well as for requests with a custom token which is generated by a custom service for authorized users.&lt;/p&gt;
&lt;p&gt;To achieve this, we need to create the custom &lt;code&gt;AuthenticationScheme&lt;/code&gt; and configure a policy to use our custom scheme as well as &lt;code&gt;JwtBearer&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;custom-authenticationscheme&quot;&gt;Custom AuthenticationScheme&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#custom-authenticationscheme&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Creating a custom authentication scheme will validate the custom token using the &lt;code&gt;[Authorize]&lt;/code&gt; attribute.&lt;/p&gt;
&lt;p&gt;To create a custom authentication scheme, we need to define the following,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CustomAuthenticationDefaults&lt;/li&gt;
&lt;li&gt;CustomAuthenticationHandler&lt;/li&gt;
&lt;li&gt;CustomAuthenticationOptions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s start with the defaults, where we describe the name of the scheme.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Custom&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public static class CustomAuthenticationDefaults{    public const string AuthenticationScheme = &amp;quot;Custom&amp;quot;;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Next &lt;code&gt;AuthenticationSchemeOptions&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AspNetCore&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Authentication&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AuthenticationSchemeOptions&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;UserInfoEndpoint&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Microsoft.AspNetCore.Authentication;public class CustomAuthOptions : AuthenticationSchemeOptions{    public string UserInfoEndpoint { get; set; }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;To validate the custom token, I need to send an HTTP request to an endpoint and the URL for that endpoint needs to be configurable.
By defining &lt;code&gt;AuthenticationSchemeOptions&lt;/code&gt;, we can pass these values while setting up the scheme in the Startup.&lt;/p&gt;
&lt;p&gt;Let’s move on to &lt;code&gt;AuthenticationHandler&lt;/code&gt;, which validates the token.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Flurl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Http&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AspNetCore&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Authentication&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Extensions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Logging&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Extensions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Collections&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Generic&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Security&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claims&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Encodings&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Web&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Threading&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Tasks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthenticationHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AuthenticationHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CustomAuthenticationHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IOptionsMonitor&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthOptions&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ILoggerFactory&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;UrlEncoder&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;encoder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ISystemClock&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;clock&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;base&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;encoder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;clock&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;override&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;HandleAuthenticateAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ContainsKey&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authorization&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Fail&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Unauthorized&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;authorizationHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authorization&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;IsNullOrEmpty&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;authorizationHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;NoResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;authorizationHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;StartsWith&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StringComparison&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OrdinalIgnoreCase&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Fail&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Unauthorized&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;token&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;authorizationHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Substring&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Length&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Trim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;IsNullOrEmpty&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;token&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Fail&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Unauthorized&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;try&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ValidateTokenAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;token&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Exception&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;ex&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Fail&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ex&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Message&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ValidateTokenAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;session&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// getting user info using HTTP request made using Flurl&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;UserInfoEndpoint&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;WithHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;some-id&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;session&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetJsonAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;User&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Fail&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Unauthorized&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;claims&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClaimTypes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Surname&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClaimTypes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;GivenName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClaimTypes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Surname&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;surname&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;scope&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;orders:write&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClaimTypes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;NameIdentifier&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Claim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClaimTypes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Role&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;User&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;identity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ClaimsIdentity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;claims&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Scheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;principal&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ClaimsPrincipal&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;identity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;ticket&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AuthenticationTicket&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;principal&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Scheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticateResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Success&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ticket&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Flurl.Http;using Microsoft.AspNetCore.Authentication;using Microsoft.Extensions.Logging;using Microsoft.Extensions.Options;using System;using System.Collections.Generic;using System.Security.Claims;using System.Text.Encodings.Web;using System.Threading.Tasks;...public class CustomAuthenticationHandler : AuthenticationHandler&lt;CustomAuthOptions&gt;{    public CustomAuthenticationHandler(        IOptionsMonitor&lt;CustomAuthOptions&gt; options,        ILoggerFactory logger,        UrlEncoder encoder,        ISystemClock clock        )        : base(options, logger, encoder, clock)    {    }    protected override async Task&lt;AuthenticateResult&gt; HandleAuthenticateAsync()    {        if (!Request.Headers.ContainsKey(&amp;quot;Authorization&amp;quot;))            return AuthenticateResult.Fail(&amp;quot;Unauthorized&amp;quot;);        string authorizationHeader = Request.Headers[&amp;quot;Authorization&amp;quot;];        if (string.IsNullOrEmpty(authorizationHeader))        {            return AuthenticateResult.NoResult();        }        if (!authorizationHeader.StartsWith(CustomAuthenticationDefaults.AuthenticationScheme, StringComparison.OrdinalIgnoreCase))        {            return AuthenticateResult.Fail(&amp;quot;Unauthorized&amp;quot;);        }        string token = authorizationHeader.Substring(CustomAuthenticationDefaults.AuthenticationScheme.Length).Trim();        if (string.IsNullOrEmpty(token))        {            return AuthenticateResult.Fail(&amp;quot;Unauthorized&amp;quot;);        }        try        {            return await ValidateTokenAsync(token);        }        catch (Exception ex)        {            return AuthenticateResult.Fail(ex.Message);        }    }    private async Task&lt;AuthenticateResult&gt; ValidateTokenAsync(string session)    {        // getting user info using HTTP request made using Flurl        var user = await Options.UserInfoEndpoint            .WithHeader(&amp;quot;some-id&amp;quot;, session)            .GetJsonAsync&lt;User&gt;();        if (user == null)        {            return AuthenticateResult.Fail(&amp;quot;Unauthorized&amp;quot;);        }        var claims = new List&lt;Claim&gt;        {            new Claim(ClaimTypes.Name, $&amp;quot;{user.Name} {user.Surname}&amp;quot;),            new Claim(ClaimTypes.GivenName, $&amp;quot;{user.Name}&amp;quot;),            new Claim(ClaimTypes.Surname, surname),            new Claim(&amp;quot;scope&amp;quot;, &amp;quot;orders:write&amp;quot;),            new Claim(ClaimTypes.NameIdentifier, user.id)            new Claim(ClaimTypes.Role, &amp;quot;User&amp;quot;)        };        var identity = new ClaimsIdentity(claims, Scheme.Name);        var principal = new ClaimsPrincipal(identity);        var ticket = new AuthenticationTicket(principal, Scheme.Name);        return AuthenticateResult.Success(ticket);    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the &lt;code&gt;AuthenticationHandler&lt;/code&gt;, you can use your way to validate your tokens.&lt;/p&gt;
&lt;p&gt;Now we need to configure our project to use the custom authentication, for that, in the &lt;code&gt;ConfigureServices&lt;/code&gt; of &lt;code&gt;startup.cs&lt;/code&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddCustomAuthentication&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;services    .AddCustomAuthentication(Configuration);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IServiceCollection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddCustomAuthentication&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IServiceCollection&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IConfiguration&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Identity Server Configuration&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;identityUrl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication:IdentityServerBaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddAuthentication&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DefaultAuthenticateScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;JwtBearerDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DefaultChallengeScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;JwtBearerDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddJwtBearer&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Authority&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;identityUrl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;RequireHttpsMetadata&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Audience&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;your_api&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Custom Authentication configuration&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddAuthentication&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomAuthenticationHandler&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;UserInfoEndpoint&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication:Custom:UserInfoEndpoint&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// we define policies here where we configure which scheme or combinations we need for each of our policies.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddAuthorization&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// authorize using custom auth scheme only&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddPolicy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;UserRole&amp;quot;&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationSchemes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;RequireRole&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;User&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// authorize using custom auth scheme as well as identity server&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddPolicy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;OrdersWrite&amp;quot;&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationSchemes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;JwtBearerDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationSchemes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CustomAuthenticationDefaults&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AuthenticationScheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;RequireClaim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;scope&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;orders:write&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public static IServiceCollection AddCustomAuthentication(this IServiceCollection services, IConfiguration configuration){    // Identity Server Configuration    var identityUrl = configuration.GetValue&lt;string&gt;(&amp;quot;Authentication:IdentityServerBaseUrl&amp;quot;);    services.AddAuthentication(options =&gt;    {        options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;        options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;    }).AddJwtBearer(options =&gt;    {        options.Authority = identityUrl;        options.RequireHttpsMetadata = false;        options.Audience = &amp;quot;your_api&amp;quot;;    });    // Custom Authentication configuration    services.AddAuthentication(CustomAuthenticationDefaults.AuthenticationScheme)        .AddScheme&lt;CustomAuthOptions, CustomAuthenticationHandler&gt;(CustomAuthenticationDefaults.AuthenticationScheme,        o =&gt; o.UserInfoEndpoint = configuration.GetValue&lt;string&gt;(&amp;quot;Authentication:Custom:UserInfoEndpoint&amp;quot;));    // we define policies here where we configure which scheme or combinations we need for each of our policies.    services.AddAuthorization(options =&gt;    {        // authorize using custom auth scheme only        options.AddPolicy(&amp;quot;UserRole&amp;quot;, policy =&gt;        {            policy.AuthenticationSchemes.Add(CustomAuthenticationDefaults.AuthenticationScheme);            policy.RequireRole(&amp;quot;User&amp;quot;);        });        // authorize using custom auth scheme as well as identity server        options.AddPolicy(&amp;quot;OrdersWrite&amp;quot;, policy =&gt;        {            policy.AuthenticationSchemes.Add(JwtBearerDefaults.AuthenticationScheme);            policy.AuthenticationSchemes.Add(CustomAuthenticationDefaults.AuthenticationScheme);            policy.RequireClaim(&amp;quot;scope&amp;quot;, &amp;quot;orders:write&amp;quot;);        });    });    return services;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;You can have different combinations in the policy defined above like based on scheme, claim, etc.&lt;/p&gt;
&lt;p&gt;The configuration in the &lt;code&gt;appsettings.json&lt;/code&gt; look like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authentication&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Custom&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UserInfoEndpoint&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://yourcustomauthwebsite.com/user-info-path&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;IdentityServerBaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://url-of-idserver&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&amp;quot;Authentication&amp;quot;: {    &amp;quot;Custom&amp;quot;: {      &amp;quot;UserInfoEndpoint&amp;quot;: &amp;quot;https://yourcustomauthwebsite.com/user-info-path&amp;quot;    },    &amp;quot;IdentityServerBaseUrl&amp;quot;: &amp;quot;https://url-of-idserver&amp;quot;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Done, let’s enable the multi authorization to our endpoint. In the controller action,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Authorize&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Policy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;OrdersWrite&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ActionResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OrderResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateOrder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OrderRequest&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;orderRequest&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;clientIdClaim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;HttpContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;User&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FindFirst&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;client_id&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;); &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// identity server client&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;userIdClaim&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;HttpContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;User&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FindFirst&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClaimTypes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;NameIdentifier&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;); &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// user authenticated using custom auth handler.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;[Authorize(Policy = &amp;quot;OrdersWrite&amp;quot;)]public async Task&lt;ActionResult&lt;OrderResult&gt;&gt; CreateOrder(OrderRequest orderRequest){    var clientIdClaim = HttpContext.User.FindFirst(&amp;quot;client_id&amp;quot;); // identity server client    var userIdClaim = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier); // user authenticated using custom auth handler.    ...}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Now we can invoke our create order endpoint with valid &lt;code&gt;bearer&lt;/code&gt; token as well as with our custom token.
The general format for authorization header is,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;Authorization: &amp;lt;type&amp;gt; &amp;lt;credentials&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Authorization: &lt;type&gt; &lt;credentials&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;So bearer token request header looks like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And our custom token request header looks like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;Authorization: custom abcasdjasdjlaksdjlasjdlasjd&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Authorization: custom abcasdjasdjlaksdjlasjdlasjd&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://joonasw.net/view/creating-auth-scheme-in-aspnet-core-2?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-using-multiple-authentication-schemes&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Creating an authentication scheme in ASP.NET Core 2.0 - Joonas W’s blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-using-multiple-authentication-schemes&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Authorize with a specific scheme in ASP.NET Core | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-using-multiple-authentication-schemes&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Policy-based authorization in ASP.NET Core | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>aspnet-core</category><author>Abhith Rajan</author></item><item><title>Serilog - Console Sink Themes</title><link>https://www.abhith.net/blog/serilog-console-sink-themes/</link><guid isPermaLink="true">https://www.abhith.net/blog/serilog-console-sink-themes/</guid><description>Curious about how each theme in Serilog.Sinks.Console looks like?
Check them here.</description><pubDate>Sat, 20 Jun 2020 19:17:00 GMT</pubDate><content:encoded>&lt;p&gt;Serilog is my favorite logger. The sinks I was using are ApplicationInsights, File, and Seq (for local). I was not using &lt;strong&gt;Console&lt;/strong&gt; sink but when we switched to &lt;code&gt;docker&lt;/code&gt;, I thought it is nice to have &lt;strong&gt;Console&lt;/strong&gt; too.&lt;/p&gt;
&lt;p&gt;I was checking the colored output for &lt;strong&gt;Console&lt;/strong&gt; and I realized that the &lt;code&gt;serilog-sinks-coloredconsole&lt;/code&gt; is retired and the &lt;code&gt;Serilog.Sinks.Console&lt;/code&gt; by default has the colored output. There were few color themes listed on the &lt;a href=&quot;https://github.com/serilog/serilog-sinks-console?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=serilog-console-sink-themes&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;readme&lt;/a&gt; so I want to see how each looks like, and see it for yourself below.&lt;/p&gt;
&lt;h2 id=&quot;built-in-themes&quot;&gt;Built-in Themes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#built-in-themes&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;systemconsolethemeliterate-default&quot;&gt;SystemConsoleTheme.Literate (Default)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#systemconsolethemeliterate-default&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console()&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;theme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;SystemConsoleTheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Literate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console(theme: SystemConsoleTheme.Literate)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/SystemConsoleTheme.Literate.C6BOluxk_Z1GfJax.webp&quot; alt=&quot;SystemConsoleTheme.Literate&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1901&quot; height=&quot;233&quot;&gt;&lt;figcaption&gt;SystemConsoleTheme.Literate&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;consolethemenone&quot;&gt;ConsoleTheme.None&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#consolethemenone&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;theme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConsoleTheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;None&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console(theme: ConsoleTheme.None)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/ConsoleTheme.None.BqNVxee4_Zf8v8e.webp&quot; alt=&quot;ConsoleTheme.None&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1900&quot; height=&quot;231&quot;&gt;&lt;figcaption&gt;ConsoleTheme.None&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;systemconsolethemegrayscale&quot;&gt;SystemConsoleTheme.Grayscale&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#systemconsolethemegrayscale&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;theme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;SystemConsoleTheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Grayscale&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console(theme: SystemConsoleTheme.Grayscale)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/SystemConsoleTheme.Grayscale.mIKGcG-Z_ZTr5Gz.webp&quot; alt=&quot;SystemConsoleTheme.Grayscale&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1903&quot; height=&quot;224&quot;&gt;&lt;figcaption&gt;SystemConsoleTheme.Grayscale&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;ansiconsolethemeliterate&quot;&gt;AnsiConsoleTheme.Literate&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ansiconsolethemeliterate&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;theme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AnsiConsoleTheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Literate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console(theme: AnsiConsoleTheme.Literate)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/AnsiConsoleTheme.Literate.COSyrLhO_drMmL.webp&quot; alt=&quot;AnsiConsoleTheme.Literate&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1901&quot; height=&quot;230&quot;&gt;&lt;figcaption&gt;AnsiConsoleTheme.Literate&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;ansiconsolethemegrayscale&quot;&gt;AnsiConsoleTheme.Grayscale&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ansiconsolethemegrayscale&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;theme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AnsiConsoleTheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Grayscale&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console(theme: AnsiConsoleTheme.Grayscale)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/AnsiConsoleTheme.Grayscale.70hs92ZR_c22RV.webp&quot; alt=&quot;AnsiConsoleTheme.Grayscale&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1902&quot; height=&quot;232&quot;&gt;&lt;figcaption&gt;AnsiConsoleTheme.Grayscale&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;ansiconsolethemecode&quot;&gt;AnsiConsoleTheme.Code&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ansiconsolethemecode&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;theme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;AnsiConsoleTheme&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Code&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.WriteTo.Console(theme: AnsiConsoleTheme.Code)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/AnsiConsoleTheme.Code.Dq4Wzsll_1Dvdpl.webp&quot; alt=&quot;AnsiConsoleTheme.Code&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1901&quot; height=&quot;236&quot;&gt;&lt;figcaption&gt;AnsiConsoleTheme.Code&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;final-notes&quot;&gt;Final Notes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#final-notes&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the above list, my favorite so far is the &lt;code&gt;default&lt;/code&gt; one. I didn’t try any custom themes yet. if you know any good looking custom themes, let me know in the comments 👇&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/serilog/serilog-sinks-console?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=serilog-console-sink-themes&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;serilog/serilog-sinks-console&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>serilog</category><category>aspnet-core</category><category>logging</category><author>Abhith Rajan</author></item><item><title>Best FREE Form Provider for Static Websites</title><link>https://www.abhith.net/blog/best-free-form-provider-for-static-websites/</link><guid isPermaLink="true">https://www.abhith.net/blog/best-free-form-provider-for-static-websites/</guid><description>Planning to create a contact form for your static website?
Check out some of the best FREE services to ease your job.</description><pubDate>Wed, 10 Jun 2020 09:17:00 GMT</pubDate><content:encoded>&lt;p&gt;If you have a static website like a portfolio without a contact form then you are missing so many opportunities.
I realized it after adding a contact form on my website here.&lt;/p&gt;
&lt;p&gt;Now you might be thinking about how difficult it is to add a form to your website, and I can tell you that it is easier than you think. Without any backend codes, we can consume some of the awesome &lt;strong&gt;FORM BACKEND as a Service&lt;/strong&gt; providers. Some of them I explored yet are listed here.&lt;/p&gt;
&lt;h2 id=&quot;services&quot;&gt;Services&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#services&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;aside class=&quot;alert alert--important&quot; role=&quot;note&quot; aria-label=&quot;Important&quot;&gt; &lt;p class=&quot;alert__title&quot;&gt;&lt;span class=&quot;alert__icon&quot; aria-hidden=&quot;true&quot;&gt;!&lt;/span&gt;Important&lt;/p&gt; &lt;div class=&quot;alert__body&quot;&gt;&lt;p&gt;The plan details attached in this article are likely to get outdated soon
since the service providers are likely to change their plans frequently.&lt;/p&gt;&lt;/div&gt; &lt;/aside&gt;
&lt;h3 id=&quot;getform&quot;&gt;Getform&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#getform&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Form backend platform for designers
and developers&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My current &lt;a href=&quot;https://www.abhith.net/contact/&quot;&gt;contact form&lt;/a&gt; is powered by &lt;a href=&quot;https://getform.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Getform&lt;/a&gt;. Their free plan details given below,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/Getform-pricing.MUkSBQof_1DI0tV.webp&quot; alt=&quot;Getform pricing&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;824&quot; height=&quot;759&quot;&gt;&lt;figcaption&gt;Getform pricing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;del&gt;It indicates 100 Submissions in the FREE plan which I thought renews every month but the FAQ says it’s not.
That triggered me to search for another provider who offers a better FREE plan.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;The pricing model of &lt;a href=&quot;https://getform.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Getform&lt;/a&gt; changed and I am happy with the change.&lt;/p&gt;
&lt;p&gt;If you want to check how I created the contact form in this Gatsby website using &lt;strong&gt;&lt;a href=&quot;https://getform.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Getform&lt;/a&gt;&lt;/strong&gt;, check my commit &lt;a href=&quot;https://github.com/abhith/abhith.net/commit/ad46ca37cfd5bc76593aff0ca11a75156d1b77fb&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://getform.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Getform.io | Easy form endpoints for your forms&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;kwes-forms&quot;&gt;Kwes forms&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#kwes-forms&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It looks like &lt;a href=&quot;https://kwes.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Kwes&lt;/a&gt; offers more features and a generous 50 submissions per month for FREE.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/kwes-pricing.CHDruvvb_1NpdSg.webp&quot; alt=&quot;Kwes pricing&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1253&quot; height=&quot;538&quot;&gt;&lt;figcaption&gt;Kwes pricing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://kwes.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Kwes forms | Form Endpoint Service&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;smartforms&quot;&gt;SmartForms&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#smartforms&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://smartforms.dev/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmartForms&lt;/a&gt; also offers 50 submissions per month for free.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/smartforms-pricing.CzzzBvl-_sBeup.webp&quot; alt=&quot;SmartForms pricing&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1357&quot; height=&quot;804&quot;&gt;&lt;figcaption&gt;SmartForms pricing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://smartforms.dev/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmartForms - Powerful and easy to setup form backend that alerts you on E-email, Slack and Telegram!&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;formcarry&quot;&gt;formcarry.&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#formcarry&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you want more submissions per month for FREE, look for &lt;a href=&quot;https://kwes.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;formcarry&lt;/a&gt;. It offers 100 submissions per month for FREE.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/formcarry-pricing.olfu_sS4_13SfLe.webp&quot; alt=&quot;formcarry pricing&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1182&quot; height=&quot;794&quot;&gt;&lt;figcaption&gt;formcarry pricing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://formcarry.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Formcarry. | Hassle-Free Form Backend&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;formsubmit&quot;&gt;formsubmit&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#formsubmit&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you want unlimited submissions for FREE, &lt;strong&gt;&lt;a href=&quot;https://formsubmit.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Formsubmit&lt;/a&gt;&lt;/strong&gt; is the one.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Formsubmit sends all your form submissions to your email without having a need for any coding or a backbend. SignUp (optional) to get additional advantages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And they don’t even have a pricing page to show 💙&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://formsubmit.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Formsubmit&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I didn’t switch from &lt;strong&gt;&lt;a href=&quot;https://getform.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Getform&lt;/a&gt;&lt;/strong&gt; yet and am still reviewing other services. I will update this article whenever I find better solutions.
If you know any good services in this category, let me know in the comments 👇&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://css-tricks.com/a-comparison-of-static-form-providers/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;A Comparison of Static Form Providers | CSS-Tricks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://serverless.css-tricks.com/services/forms/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Services | Forms - The Power of Serverless for Front-End Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.gatsbyjs.org/docs/building-a-contact-form/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-free-form-provider-for-static-websites&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Building a Contact Form | GatsbyJS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>developer-tools</category><category>awesome-list</category><category>gatsby</category><author>Abhith Rajan</author></item><item><title>2020 Pluralsight Free April Month Review</title><link>https://www.abhith.net/blog/2020-pluralsight-free-april-review/</link><guid isPermaLink="true">https://www.abhith.net/blog/2020-pluralsight-free-april-review/</guid><description>Want to know How I spend my FREE April month on Pluralsight, plus how to extend Pluralsight subscription for another one free month.</description><pubDate>Sat, 02 May 2020 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;I completed the #FreeApril of Pluralsight and it was very productive. In this one month, I completed around 16 courses, and they are,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/completed-courses.DoCw8nLs_ZfeeFP.webp&quot; alt=&quot;Completed Courses&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1037&quot; height=&quot;880&quot;&gt;&lt;figcaption&gt;Completed Courses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And I tested my Skills IQ,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/skills-iq.DR34qQpX_2i80vw.webp&quot; alt=&quot;Skills IQ&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1295&quot; height=&quot;800&quot;&gt;&lt;figcaption&gt;Skills IQ&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And there are many other courses which I started watching but yet not finished,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/history.D1K3hhoa_Z12nmA6.webp&quot; alt=&quot;History&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1920&quot; height=&quot;3035&quot;&gt;&lt;figcaption&gt;History&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Also, you can check my public profile on &lt;strong&gt;Pluralsight&lt;/strong&gt;,&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://app.pluralsight.com/profile/abhith?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=2020-pluralsight-free-april-review&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Abhith Rajan | Pluralsight Profile&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;extending-pluralsight-subscription-for-another-one-free-month&quot;&gt;Extending Pluralsight Subscription For Another One Free Month&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#extending-pluralsight-subscription-for-another-one-free-month&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I extended my &lt;strong&gt;Pluralsight&lt;/strong&gt; subscription for one more month by activating the &lt;strong&gt;Visual Studio Dev Essentials&lt;/strong&gt; benefit, its &lt;strong&gt;FREE&lt;/strong&gt;.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/visual-studio-dev-essentials-benefits.tKRtR4Ys_Z1j1xDx.webp&quot; alt=&quot;Visual Studio Dev Essentials Benefits&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1824&quot; height=&quot;908&quot;&gt;&lt;figcaption&gt;Visual Studio Dev Essentials Benefits&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If you don’t have an account on &lt;strong&gt;Visual Studio Dev Essentials&lt;/strong&gt;, join on the link below, its also free and have many other benefits like shown above,&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://visualstudio.microsoft.com/dev-essentials/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=2020-pluralsight-free-april-review&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Visual Studio Dev Essentials&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;discounts&quot;&gt;Discounts&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#discounts&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you have enough budget, you can signup for their paid subscription, and get some &lt;strong&gt;DISCOUNTS&lt;/strong&gt; by using my referral,&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;http://referral.pluralsight.com/mQgi3iP?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=2020-pluralsight-free-april-review&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Pluralsight Referral - Abhith&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-plan-after-subscription-expiry&quot;&gt;What is the plan, After Subscription Expiry&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#what-is-the-plan-after-subscription-expiry&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After this extra free month of Pluralsight, I plan to start the free month of &lt;strong&gt;LinkedIn Learning&lt;/strong&gt; and will compare the course quality with &lt;strong&gt;Pluralsight&lt;/strong&gt;, then I might switch to a paid plan on either of these two platforms.&lt;/p&gt;
&lt;p&gt;I know many companies provide access to these e-learning platforms to their employees, if you are getting such a benefit from your firm, let me know in the comments 👇&lt;/p&gt;</content:encoded><category>courses</category><author>Abhith Rajan</author></item><item><title>.NET Core - NuGet Packages CI &amp; CD Using GitHub Actions</title><link>https://www.abhith.net/blog/dotnet-core-nuget-packages-ci-cd-using-github-actions/</link><guid isPermaLink="true">https://www.abhith.net/blog/dotnet-core-nuget-packages-ci-cd-using-github-actions/</guid><description>Build and run tests on every commit. Automatically upload NuGet packages on every release. All using GitHub actions for your .NET Core Class Libraries.</description><pubDate>Thu, 02 Apr 2020 00:11:27 GMT</pubDate><content:encoded>&lt;p&gt;I always likes to automate the repeatative part of my work. At work, Azure DevOps taking care of the most of the CI &amp;amp; CD. I do maintain a small Class Library project in GitHub which has some helpers and stuffs you know like we reuse on most projects. And is been published to NuGet so that it can be consumed easily.&lt;/p&gt;
&lt;p&gt;Recently I added one more project to the same repo which has some common stuff for ASP.NET Core projects. Previously I used to manually upload the .nuget pack file to NuGet since the releases were not that frequent. But now, the number of projects doubled, and sometime we need to deploy both packages since the ASP.NET Core project depends on the other library. So I did automated the whole process using GitHub actions. Here is how I did that,&lt;/p&gt;
&lt;p&gt;You can check my repo where you can find the &lt;strong&gt;GitHub Actions&lt;/strong&gt; configuration &lt;code&gt;yml&lt;/code&gt; files under the &lt;code&gt;.github/workflows/&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.com/Abhith/Code.Library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Abhith/Code.Library&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have two actions,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;CI&lt;/li&gt;
&lt;li&gt;Release to NuGet&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;ci&quot;&gt;CI&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ci&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The CI (Continuous Integration) action basically runs on every commit to the &lt;strong&gt;master&lt;/strong&gt; branch as well as for every PR to master.&lt;/p&gt;
&lt;p&gt;And the jobs are pretty self-explanatory,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setting up dotnet on the Linux&lt;/li&gt;
&lt;li&gt;Builds the solution file&lt;/li&gt;
&lt;li&gt;Run tests&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# This is a basic workflow to help you get started with Actions&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;CI&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Controls when the action will run. Triggers the workflow on push or pull request&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# events but only for the master branch&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;branches&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;master&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pull_request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;branches&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;master&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# A workflow run is made up of one or more jobs that can run sequentially or in parallel&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# This workflow contains a single job called &amp;quot;build&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# The type of runner that the job will run on&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;runs-on&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Steps represent a sequence of tasks that will be executed as part of the job&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;actions/checkout@v2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Setup .NET Core&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;actions/setup-dotnet@v1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dotnet-version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;3.1.101&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Build with dotnet&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;dotnet build --configuration Release&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;working-directory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;./src&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;dotnet test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;working-directory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;./src&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;# This is a basic workflow to help you get started with Actionsname: CI# Controls when the action will run. Triggers the workflow on push or pull request# events but only for the master branchon:  push:    branches: [master]  pull_request:    branches: [master]# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs:  # This workflow contains a single job called &amp;quot;build&amp;quot;  build:    # The type of runner that the job will run on    runs-on: ubuntu-latest    # Steps represent a sequence of tasks that will be executed as part of the job    steps:      - uses: actions/checkout@v2      - name: Setup .NET Core        uses: actions/setup-dotnet@v1        with:          dotnet-version: 3.1.101      - name: Build with dotnet        run: dotnet build --configuration Release        working-directory: ./src      - name: Test        run: dotnet test        working-directory: ./src&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/CI.BUutZqDh_dnUFJ.webp&quot; alt=&quot;Continuous Integration&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;653&quot; height=&quot;506&quot;&gt;&lt;figcaption&gt;Continuous Integration&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;release-to-nuget&quot;&gt;Release to NuGet&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#release-to-nuget&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This action runs on every new release. And the jobs include,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setting up dotnet on the Linux&lt;/li&gt;
&lt;li&gt;Create the .nupkg files&lt;/li&gt;
&lt;li&gt;Uploads artifacts&lt;/li&gt;
&lt;li&gt;Upload the Nuget packages&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# This is a basic workflow to help you get started with Actions&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Release to NuGet&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Controls when the action will run. Triggers the workflow on push or pull request&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# events but only for the master branch&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;release&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;types&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;published&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# A workflow run is made up of one or more jobs that can run sequentially or in parallel&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# This workflow contains a single job called &amp;quot;build&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# The type of runner that the job will run on&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;runs-on&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Steps represent a sequence of tasks that will be executed as part of the job&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;actions/checkout@v2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Setup .NET Core&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;actions/setup-dotnet@v1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dotnet-version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;3.1.101&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Create NuGet Package&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;dotnet pack -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes=&amp;quot;See https://github.com/Abhith/Code.Library/releases/tag/${{ github.event.release.tag_name }}&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;working-directory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;./src&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Archive NuGet Package&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;actions/upload-artifact@v1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Code.Library&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;./src/Code.Library/bin/Release/Code.Library.${{ github.event.release.tag_name }}.nupkg&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Archive NuGet Package&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;actions/upload-artifact@v1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Code.Library.AspNetCore&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;./src/Code.Library.AspNetCore/bin/Release/Code.Library.AspNetCore.${{ github.event.release.tag_name }}.nupkg&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Publish Nuget Package&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;dotnet nuget push **/*.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --no-symbols true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;# This is a basic workflow to help you get started with Actionsname: Release to NuGet# Controls when the action will run. Triggers the workflow on push or pull request# events but only for the master branchon:  release:    types: [published]# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs:  # This workflow contains a single job called &amp;quot;build&amp;quot;  build:    # The type of runner that the job will run on    runs-on: ubuntu-latest    # Steps represent a sequence of tasks that will be executed as part of the job    steps:      - uses: actions/checkout@v2      - name: Setup .NET Core        uses: actions/setup-dotnet@v1        with:          dotnet-version: 3.1.101      - name: Create NuGet Package        run: dotnet pack -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes=&amp;quot;See https://github.com/Abhith/Code.Library/releases/tag/${{ github.event.release.tag_name }}&amp;quot;        working-directory: ./src      - name: Archive NuGet Package        uses: actions/upload-artifact@v1        with:          name: Code.Library          path: ./src/Code.Library/bin/Release/Code.Library.${{ github.event.release.tag_name }}.nupkg      - name: Archive NuGet Package        uses: actions/upload-artifact@v1        with:          name: Code.Library.AspNetCore          path: ./src/Code.Library.AspNetCore/bin/Release/Code.Library.AspNetCore.${{ github.event.release.tag_name }}.nupkg      - name: Publish Nuget Package        run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --no-symbols true&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/release.BAHNtSY1_BmGpw.webp&quot; alt=&quot;Release to NuGet&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;635&quot; height=&quot;569&quot;&gt;&lt;figcaption&gt;Release to NuGet&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;You can see that I am pushing 2 NuGet packages and both have the same version number, which is same as my release tag on GitHub.&lt;/p&gt;
&lt;p&gt;During &lt;strong&gt;Create NuGet Package&lt;/strong&gt; stage, initially it was failing with following error&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;.dll&amp;#39; to be packed was not found on disk&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.dll&apos; to be packed was not found on disk&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This was because, in one of the project, it had following Settings in the .csproj file&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;GeneratePackageOnBuild&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;GeneratePackageOnBuild&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;GeneratePackageOnBuild&gt;true&lt;/GeneratePackageOnBuild&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Once I removed the above, everything went well. You can see a similar issue posted &lt;a href=&quot;https://github.com/dotnet/sdk/issues/10335?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dotnet-core-nuget-packages-ci-cd-using-github-actions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And the “Publish NuGet Package” job requires an API key from NuGet. You can get the API key from NuGet by logging into your NuGet account, create a new API key.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/NuGet-keys.BlaaFSEv_14Oahp.webp&quot; alt=&quot;NuGet API Key&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;284&quot; height=&quot;430&quot;&gt;&lt;figcaption&gt;NuGet API Key&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And I stored the key under my repo secrets.&lt;/p&gt;
&lt;h3 id=&quot;manage-secrets-in-github-repository&quot;&gt;Manage Secrets in GitHub Repository&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#manage-secrets-in-github-repository&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To manage secrets, on your repo go to the “Settings” tab, under that “Secrets”. There I added a secret with name “nuget_api_key” and we can access those secrets inside actions like &lt;code&gt;${{ secrets.nuget_api_key }}&lt;/code&gt;.&lt;/p&gt;</content:encoded><category>dotnet-core</category><category>devops</category><category>github</category><author>Abhith Rajan</author></item><item><title>Best Visual Studio Extensions</title><link>https://www.abhith.net/blog/best-visual-studio-extensions/</link><guid isPermaLink="true">https://www.abhith.net/blog/best-visual-studio-extensions/</guid><description>My favorite extensions for Visual Studio 2022</description><pubDate>Tue, 17 Mar 2020 17:50:10 GMT</pubDate><content:encoded>&lt;p&gt;During my work, I spend the most time with Visual Studio.
Now because of &lt;strong&gt;VSCode&lt;/strong&gt;, Visual Studio is getting little more free time.
There was a time when I just thought that I couldn’t be productive without &lt;strong&gt;ReSharper&lt;/strong&gt; for Visual Studio.
But those times changed since Visual Studio is getting better with every new release. The number of extensions in the marketplace also helps.
The following are my favorite tools and extensions for Visual Studio 2022.&lt;/p&gt;
&lt;aside class=&quot;alert alert--info&quot; role=&quot;note&quot; aria-label=&quot;Info&quot;&gt; &lt;p class=&quot;alert__title&quot;&gt;&lt;span class=&quot;alert__icon&quot; aria-hidden=&quot;true&quot;&gt;ℹ&lt;/span&gt;Info&lt;/p&gt; &lt;div class=&quot;alert__body&quot;&gt;&lt;p&gt;Some of the below items are extension packs, which contain several extensions.&lt;/p&gt;&lt;/div&gt; &lt;/aside&gt;
&lt;h2 id=&quot;free-tools&quot;&gt;Free Tools&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#free-tools&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;codemaid-vs2022&quot;&gt;CodeMaid VS2022&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#codemaid-vs2022&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=SteveCadwallader.CodeMaidVS2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/SteveCadwallader.CodeMaidVS2022.svg&quot; alt=&quot;CodeMaid VS2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/SteveCadwallader.CodeMaidVS2022.svg&quot; alt=&quot;CodeMaid VS2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/SteveCadwallader.CodeMaidVS2022.svg&quot; alt=&quot;CodeMaid VS2022&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=SteveCadwallader.CodeMaidVS2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CodeMaid VS2022&lt;/a&gt; is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.&lt;/p&gt;
&lt;h3 id=&quot;ef-core-power-tools&quot;&gt;EF Core Power Tools&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ef-core-power-tools&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/ErikEJ.EFCorePowerTools.svg&quot; alt=&quot;EF Core Power Tools&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ErikEJ.EFCorePowerTools.svg&quot; alt=&quot;EF Core Power Tools&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ErikEJ.EFCorePowerTools.svg&quot; alt=&quot;EF Core Power Tools&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;EF Core Power Tools&lt;/a&gt; adds useful design-time DbContext features to the Visual Studio Solution Explorer context menu.&lt;/p&gt;
&lt;h3 id=&quot;productivity-power-tools-2022&quot;&gt;Productivity Power Tools 2022&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#productivity-power-tools-2022&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerPack2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/VisualStudioPlatformTeam.ProductivityPowerPack2022.svg&quot; alt=&quot;Productivity Power Tools 2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/VisualStudioPlatformTeam.ProductivityPowerPack2022.svg&quot; alt=&quot;Productivity Power Tools 2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/VisualStudioPlatformTeam.ProductivityPowerPack2022.svg&quot; alt=&quot;Productivity Power Tools 2022&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerPack2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Productivity Power Tools 2022&lt;/a&gt; installs the individual extensions of Productivity Power Tools 2022&lt;/p&gt;
&lt;p&gt;This is an extension pack installer will install each of the individual components of Productivity Power Tools for Visual Studio 2022.&lt;/p&gt;
&lt;p&gt;The following components will be installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Align Assignments 2022&lt;/li&gt;
&lt;li&gt;Double-Click Maximize 2022&lt;/li&gt;
&lt;li&gt;Copy As Html 2022&lt;/li&gt;
&lt;li&gt;Fix Mixed Tabs 2022&lt;/li&gt;
&lt;li&gt;Match Margin 2022&lt;/li&gt;
&lt;li&gt;Middle-Click Scroll 2022&lt;/li&gt;
&lt;li&gt;Peek Help 2022&lt;/li&gt;
&lt;li&gt;Shrink Empty Lines 2022&lt;/li&gt;
&lt;li&gt;Solution Error Visualizer 2022&lt;/li&gt;
&lt;li&gt;Time Stamp Margin 2022&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;tweaks-2022&quot;&gt;Tweaks 2022&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#tweaks-2022&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.Tweaks2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/MadsKristensen.Tweaks2022.svg&quot; alt=&quot;Tweaks 2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/MadsKristensen.Tweaks2022.svg&quot; alt=&quot;Tweaks 2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/MadsKristensen.Tweaks2022.svg&quot; alt=&quot;Tweaks 2022&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.Tweaks2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Tweaks 2022&lt;/a&gt; contains collection of minor fixes and tweaks for Visual Studio to reduce the paper cuts and make you a happier developer.&lt;/p&gt;
&lt;h3 id=&quot;wakatime-for-vs2022-preview&quot;&gt;WakaTime (For VS2022 Preview)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#wakatime-for-vs2022-preview&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=WakaTime.WakaTime-2022-preview&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/WakaTime.WakaTime-2022-preview.svg&quot; alt=&quot;WakaTime&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/WakaTime.WakaTime-2022-preview.svg&quot; alt=&quot;WakaTime&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/WakaTime.WakaTime-2022-preview.svg&quot; alt=&quot;WakaTime&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=WakaTime.WakaTime-2022-preview&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;WakaTime&lt;/a&gt; does metrics, insights, and time tracking automatically generated from your programming activity. This extension will be replaced by WakaTime when VS 2022 is officially released.&lt;/p&gt;
&lt;h3 id=&quot;xunitnettestgenerator2022&quot;&gt;xUnit.net.TestGenerator2022&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#xunitnettestgenerator2022&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=YowkoTsai.xunitnettestgenerator2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/YowkoTsai.xunitnettestgenerator2022.svg&quot; alt=&quot;xUnit.net.TestGenerator2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/YowkoTsai.xunitnettestgenerator2022.svg&quot; alt=&quot;xUnit.net.TestGenerator2022&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/YowkoTsai.xunitnettestgenerator2022.svg&quot; alt=&quot;xUnit.net.TestGenerator2022&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=YowkoTsai.xunitnettestgenerator2022&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;xUnit.net.TestGenerator2022&lt;/a&gt; adds xUnit.net Test Generator extensions for Visual Studio 2022. Creates Unit tests with xUnit.net 2.0 framework. Works on Visual Studio 2022.&lt;/p&gt;
&lt;hr/&gt;
&lt;h2 id=&quot;visual-studio-2019&quot;&gt;Visual Studio 2019&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#visual-studio-2019&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Following are the ones which I previously used with Visual Studio 2019.
Those are not brought to the upper list due to any of the following reasons,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Incompatibility with VS 2022&lt;/li&gt;
&lt;li&gt;Not tried myself in VS 2022 (Especially the paid ones)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;free-tools-1&quot;&gt;Free Tools&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#free-tools-1&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;better-comments&quot;&gt;Better Comments&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#better-comments&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=OmarRwemi.BetterComments&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/OmarRwemi.BetterComments.svg&quot; alt=&quot;Better Comments&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/OmarRwemi.BetterComments.svg&quot; alt=&quot;Better Comments&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/OmarRwemi.BetterComments.svg&quot; alt=&quot;Better Comments&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=OmarRwemi.BetterComments&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Better Comments&lt;/a&gt; is a Visual Studio extension that gives you the ability to customize the font and opacity of your comments independently of the editor’s font settings. It also adds four additional comment classifications, each classification with its own customizable foreground.&lt;/p&gt;
&lt;h4 id=&quot;buildvision&quot;&gt;BuildVision&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#buildvision&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=stefankert.BuildVision&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/stefankert.BuildVision.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/stefankert.BuildVision.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/stefankert.BuildVision.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=stefankert.BuildVision&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;BuildVision&lt;/a&gt; visualize the building process in a table format.&lt;/p&gt;
&lt;h4 id=&quot;open-in-visual-studio-code&quot;&gt;Open in Visual Studio Code&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#open-in-visual-studio-code&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.OpeninVisualStudioCode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/MadsKristensen.OpeninVisualStudioCode.svg&quot; alt=&quot;Open in Visual Studio Code&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/MadsKristensen.OpeninVisualStudioCode.svg&quot; alt=&quot;Open in Visual Studio Code&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/MadsKristensen.OpeninVisualStudioCode.svg&quot; alt=&quot;Open in Visual Studio Code&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.OpeninVisualStudioCode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Open in Visual Studio Code&lt;/a&gt; adds a menu command that lets you open any solution, project, folder and file in Visual Studio Code.&lt;/p&gt;
&lt;h4 id=&quot;roslynator-2019&quot;&gt;Roslynator 2019&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#roslynator-2019&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=josefpihrt.Roslynator2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/josefpihrt.Roslynator2019.svg&quot; alt=&quot;Roslynator 2019&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/josefpihrt.Roslynator2019.svg&quot; alt=&quot;Roslynator 2019&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/josefpihrt.Roslynator2019.svg&quot; alt=&quot;Roslynator 2019&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=josefpihrt.Roslynator2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Roslynator 2019&lt;/a&gt; is a collection of 500+ analyzers, refactorings and fixes for C#, powered by Roslyn.&lt;/p&gt;
&lt;h4 id=&quot;the-essentials&quot;&gt;The Essentials&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-essentials&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BasicEssentials&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/MadsKristensen.BasicEssentials.svg&quot; alt=&quot;The Essentials&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/MadsKristensen.BasicEssentials.svg&quot; alt=&quot;The Essentials&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/MadsKristensen.BasicEssentials.svg&quot; alt=&quot;The Essentials&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BasicEssentials&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;The Essentials&lt;/a&gt; is an extension pack for Visual Studio 2019 containing extensions no developer should be without. These extensions will add important functionality that will make you more productive and a happier developer.&lt;/p&gt;
&lt;h5 id=&quot;extensions&quot;&gt;Extensions&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#extensions&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.AddNewFile&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Add New File&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.EditorEnhancements&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Editor Enhancements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.EditorConfig&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;EditorConfig Language Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.DeveloperNews&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Developer News&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileIcons&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;File Icons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.insertguid&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Insert GUID&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.LearntheShortcut&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Learn the Shortcut&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Markdown Editor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NikolayBalakin.Outputenhancer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Output Enhancer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.Tweaks&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Tweaks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;trailing-whitespace-visualizer&quot;&gt;Trailing Whitespace Visualizer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#trailing-whitespace-visualizer&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/MadsKristensen.TrailingWhitespaceVisualizer.svg&quot; alt=&quot;Trailing Whitespace Visualizer&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/MadsKristensen.TrailingWhitespaceVisualizer.svg&quot; alt=&quot;Trailing Whitespace Visualizer&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/MadsKristensen.TrailingWhitespaceVisualizer.svg&quot; alt=&quot;Trailing Whitespace Visualizer&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Trailing Whitespace Visualizer&lt;/a&gt; keeps your code files clean by making it easier than ever to identify and remove any trailing whitespace.&lt;/p&gt;
&lt;h4 id=&quot;visual-studio-intellicode&quot;&gt;Visual Studio IntelliCode&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#visual-studio-intellicode&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.VSIntelliCode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/VisualStudioExptTeam.VSIntelliCode.svg&quot; alt=&quot;Visual Studio IntelliCode&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/VisualStudioExptTeam.VSIntelliCode.svg&quot; alt=&quot;Visual Studio IntelliCode&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/VisualStudioExptTeam.VSIntelliCode.svg&quot; alt=&quot;Visual Studio IntelliCode&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.VSIntelliCode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Visual Studio IntelliCode&lt;/a&gt;(IntelliCode) is a set of AI-assisted capabilities that improve developer productivity with features like contextual IntelliSense, argument completion, code formatting, and style rule inference.&lt;/p&gt;
&lt;p&gt;IntelliCode augments existing developer workflows with machine-learning services that provide an understanding of code and its context. It’s applicable for C#, C++ (in preview), JavaScript/TypeScript (in preview), and XAML code today, and will be updated in the future to support more languages.&lt;/p&gt;
&lt;h4 id=&quot;visual-studio-spell-checker-vs2017-and-later&quot;&gt;Visual Studio Spell Checker (VS2017 and Later)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#visual-studio-spell-checker-vs2017-and-later&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=EWoodruff.VisualStudioSpellCheckerVS2017andLater&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/EWoodruff.VisualStudioSpellCheckerVS2017andLater.svg&quot; alt=&quot;Visual Studio Spell Checker (VS2017 and Later)&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/EWoodruff.VisualStudioSpellCheckerVS2017andLater.svg&quot; alt=&quot;Visual Studio Spell Checker (VS2017 and Later)&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/EWoodruff.VisualStudioSpellCheckerVS2017andLater.svg&quot; alt=&quot;Visual Studio Spell Checker (VS2017 and Later)&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=EWoodruff.VisualStudioSpellCheckerVS2017andLater&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Visual Studio Spell Checker (VS2017 and Later)&lt;/a&gt; is an editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with a tool window. It can also spell check an entire solution, project, or selected items. Options are available to define multiple languages to spell check agains…&lt;/p&gt;
&lt;h4 id=&quot;web-essentials-2019&quot;&gt;Web Essentials 2019&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#web-essentials-2019&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebEssentials2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/MadsKristensen.WebEssentials2019.svg&quot; alt=&quot;Web Essentials 2019&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/MadsKristensen.WebEssentials2019.svg&quot; alt=&quot;Web Essentials 2019&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/MadsKristensen.WebEssentials2019.svg&quot; alt=&quot;Web Essentials 2019&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebEssentials2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Web Essentials 2019&lt;/a&gt; is the easiest way to set up Visual Studio for the ultimate web development experience.&lt;/p&gt;
&lt;h5 id=&quot;extensions-1&quot;&gt;Extensions&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#extensions-1&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;After installing the Web Essentials and restarting
Visual Studio, the following extensions will be installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/3f820e99-6c0d-41db-aa74-a18d9623b1f3?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Add New File&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/46eef4d9-045b-4596-bd7f-eee980bb5450?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Browser Reload on Save&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/5741a548-5179-4a77-ad96-fca71535774d?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Browser Sync&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/9ec27da7-e24b-4d56-8064-fd7e88ac1c40?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Bundler &amp;amp; Minifier&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.CssTools2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CSS Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/4f64e542-3772-4136-8f87-0113441c7aa1?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Editor Enhancements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/5e1762e8-a88b-417c-8467-6a65d771cc4e?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;File Icons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/3ebde8fb-26d8-4374-a0eb-1e4e2665070c?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;File Nesting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=RionWilliams.Glyphfriend2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Glyphfriend&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/8bb845e9-5717-4eae-aed3-1fdf6fe5819a?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Image Sprites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/a56eddd3-d79b-48ac-8c8f-2db06ade77c3?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Image Optimizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/eaab33c3-437b-4918-8354-872dfe5d1bfe?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Markdown Editor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/4e84e2cf-2d6b-472a-b1e2-b84932511379?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Open Command Line&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/753b9720-1638-4f9a-ad8d-2c45a410fd74?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Package Installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.PackageSecurityAlerts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Package Security Alerts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.SvgViewer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SVG Viewer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/3aabefab-1681-4fea-8f95-6a62e2f0f1ec?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Web Accessibility Checker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://visualstudiogallery.msdn.microsoft.com/3b329021-cd7a-4a01-86fc-714c2d05bb6c?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Web Compiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ZenCoding&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ZenCoding&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;h3 id=&quot;paid&quot;&gt;Paid&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#paid&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;ndepend&quot;&gt;NDepend&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ndepend&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=PatrickSmacchia.NDepend&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/PatrickSmacchia.NDepend.svg&quot; alt=&quot;NDepend&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/PatrickSmacchia.NDepend.svg&quot; alt=&quot;NDepend&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/PatrickSmacchia.NDepend.svg&quot; alt=&quot;NDepend&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.ndepend.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NDepend&lt;/a&gt; is a Visual Studio and Azure DevOps/TFS extension that makes it easy to manage Code Quality on large and complex .NET code base&lt;/p&gt;
&lt;h4 id=&quot;ncrunch-for-visual-studio&quot;&gt;NCrunch for Visual Studio&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ncrunch-for-visual-studio&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NCrunch.NCrunchforVisualStudio&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/NCrunch.NCrunchforVisualStudio.svg&quot; alt=&quot;NCrunch for Visual Studio&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/NCrunch.NCrunchforVisualStudio.svg&quot; alt=&quot;NCrunch for Visual Studio&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/NCrunch.NCrunchforVisualStudio.svg&quot; alt=&quot;NCrunch for Visual Studio&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NCrunch.NCrunchforVisualStudio&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;NCrunch for Visual Studio&lt;/a&gt; is Distributed continuous build and test runner. Persistent Inline Code Coverage, Performance Metrics. Navigation + more!&lt;/p&gt;
&lt;h4 id=&quot;ozcode&quot;&gt;OzCode&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ozcode&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=CodeValueLtd.OzCode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/CodeValueLtd.OzCode.svg&quot; alt=&quot;OzCode&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/CodeValueLtd.OzCode.svg&quot; alt=&quot;OzCode&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/CodeValueLtd.OzCode.svg&quot; alt=&quot;OzCode&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=CodeValueLtd.OzCode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;OzCode&lt;/a&gt; is a revolutionary debugging extension which complements Visual Studio and supercharges the C# debugging experience!.&lt;/p&gt;
&lt;h4 id=&quot;resharper&quot;&gt;ReSharper&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#resharper&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=JetBrains.ReSharper&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/JetBrains.ReSharper.svg&quot; alt=&quot;ReSharper&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/JetBrains.ReSharper.svg&quot; alt=&quot;ReSharper&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/JetBrains.ReSharper.svg&quot; alt=&quot;ReSharper&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=JetBrains.ReSharper&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ReSharper&lt;/a&gt; is a legendary .NET productivity tool: find and fix errors and code smells; navigate and refactor; run unit tests and write quality code faster.&lt;/p&gt;
&lt;hr/&gt;
&lt;h2 id=&quot;older-visual-studio-extensions-list&quot;&gt;Older Visual Studio Extensions List&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#older-visual-studio-extensions-list&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.abhith.net/blog/the-best-extensions-for-visual-studio-2010/&quot;&gt;Visual Studio 2010&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Did I miss something? If you think so, drop a line with the extension name in the comments below 👇.
I will be updating this post whenever I find a good extension for Visual Studio.&lt;/p&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2022-01-16&quot;&gt;2022-01-16&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-01-16&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;VS 2022 extensions added&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-11-14&quot;&gt;2020-11-14&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-11-14&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added EF Core Power Tools&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-08-20&quot;&gt;2020-08-20&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-08-20&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added The Essentials&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-08-09&quot;&gt;2020-08-09&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-08-09&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added Open in Visual Studio Code&lt;/li&gt;
&lt;li&gt;Moved NDepend to Paid&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-04-08&quot;&gt;2020-04-08&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-04-08&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added xUnit.net.TestGenerator&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-03-20&quot;&gt;2020-03-20&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-03-20&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added Roslynator 2019.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-03-18&quot;&gt;2020-03-18&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-03-18&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added Better Comments.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>visual-studio</category><category>ide</category><category>awesome-list</category><author>Abhith Rajan</author></item><item><title>Style Guide - SQL Server Auditing Column Names</title><link>https://www.abhith.net/blog/style-guide-sql-server-auditing-column-names/</link><guid isPermaLink="true">https://www.abhith.net/blog/style-guide-sql-server-auditing-column-names/</guid><description>Naming convention for auditing fields in a SQL server table.</description><pubDate>Wed, 05 Feb 2020 08:26:00 GMT</pubDate><content:encoded>&lt;p&gt;For most of the tables in our DB will have some kind of auditing fields.
Following are the column names I used to use for those auditing fields.&lt;/p&gt;
&lt;h2 id=&quot;creation-audited&quot;&gt;Creation Audited&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#creation-audited&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Column Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Nullable&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CreationTime&lt;/td&gt;&lt;td&gt;datetime2(7)&lt;/td&gt;&lt;td&gt;NOT NULL&lt;/td&gt;&lt;td&gt;eg. 2019-09-15 13:56:13.8955178&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CreatorUserId&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;modification-audited&quot;&gt;Modification Audited&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#modification-audited&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Column Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Nullable&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;LastModificationTime&lt;/td&gt;&lt;td&gt;datetime2(7)&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LastModifierUserId&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;soft-delete&quot;&gt;Soft Delete&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#soft-delete&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Column Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Nullable&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;IsDeleted&lt;/td&gt;&lt;td&gt;bit&lt;/td&gt;&lt;td&gt;NOT NULL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DeleterUserId&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DeletionTime&lt;/td&gt;&lt;td&gt;datetime2(7)&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;If you have worked with &lt;a href=&quot;https://aspnetboilerplate.com/Pages/Documents/Entities?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=style-guide-sql-server-auditing-column-names#auditing&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ABP&lt;/a&gt; before, you know from where I adopted the naming convention.&lt;/p&gt;
&lt;p&gt;When I work on a non-ABP project, I used to follow the same column names.&lt;/p&gt;
&lt;p&gt;Let me know what you used to name for auditing columns in the comments. 👇&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql?view=sql-server-ver15&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=style-guide-sql-server-auditing-column-names&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;datetime2 (Transact-SQL) - SQL Server&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>sql-server</category><category>style-guide</category><author>Abhith Rajan</author></item><item><title>Azure DevOps - GatsbyJs Build Pipeline</title><link>https://www.abhith.net/blog/azure-devops-gatsbyjs-build-pipeline/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-devops-gatsbyjs-build-pipeline/</guid><description>Continuous Integration &amp; Continuous Deployment for your GatsbyJS website using Azure Pipelines.</description><pubDate>Tue, 04 Feb 2020 15:11:27 GMT</pubDate><content:encoded>&lt;p&gt;For long I was using &lt;strong&gt;Netlify&lt;/strong&gt; to do &lt;strong&gt;CI/CD&lt;/strong&gt; for &lt;code&gt;this&lt;/code&gt; website and was using their free plan. But when they introduced the build minutes limit, I had to switch to another option.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Bad news 📰 in the morning&lt;br&gt;New limit on &lt;a href=&quot;https://x.com/hashtag/netlify?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#netlify&lt;/a&gt; build minutes.&lt;br&gt;Looking for alternative options! &lt;a href=&quot;https://t.co/W12MwlyOcn&quot;&gt;pic.twitter.com/W12MwlyOcn&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1206789696950611969?ref_src=twsrc%5Etfw&quot;&gt;December 17, 2019&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;I already have a paid account with &lt;a href=&quot;https://www.smarterasp.net/index?r=100571651&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-gatsbyjs-build-pipeline&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmarterASP.NET&lt;/a&gt; where I host &lt;a href=&quot;https://github.com/piggyvault/piggyvault?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-gatsbyjs-build-pipeline&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Piggy&lt;/a&gt; and is very much suitable for personal side projects since it is very cheap. So I thought of moving back to &lt;a href=&quot;https://www.smarterasp.net/index?r=100571651&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-gatsbyjs-build-pipeline&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmarterASP.NET&lt;/a&gt; and for CI/CD &lt;strong&gt;Azure DevOps Build &amp;amp; Release Pipelines&lt;/strong&gt; since am using the same at work.&lt;/p&gt;
&lt;h2 id=&quot;build-pipeline&quot;&gt;Build Pipeline&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build-pipeline&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We used the YAML based pipeline and steps are self-explanatory.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;trigger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;master&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pool&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;vmImage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ubuntu-latest&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;NodeTool@0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;versionSpec&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;10.x&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Install Node.js&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;npm install -g gatsby-cli&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Install gatsby-cli&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;yarn install&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Install dependencies&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;yarn build&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Gatsby build&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;CopyFiles@2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;sourceFolder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;contents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;**&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;targetFolder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;$(Build.ArtifactStagingDirectory)&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;cleanTargetFolder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Copy built site&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;condition&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;and(succeeded(), ne(variables[&amp;#39;Build.Reason&amp;#39;], &amp;#39;PullRequest&amp;#39;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;PublishBuildArtifacts@1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PathtoPublish&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;$(Build.ArtifactStagingDirectory)&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;ArtifactName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;drop&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;publishLocation&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Container&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;condition&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;and(succeeded(), ne(variables[&amp;#39;Build.Reason&amp;#39;], &amp;#39;PullRequest&amp;#39;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Publish Build Artifacts&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;trigger:  - masterpool:  vmImage: &amp;quot;ubuntu-latest&amp;quot;steps:  - task: NodeTool@0    inputs:      versionSpec: &amp;quot;10.x&amp;quot;    displayName: &amp;quot;Install Node.js&amp;quot;  - script: |      npm install -g gatsby-cli    displayName: &amp;quot;Install gatsby-cli&amp;quot;  - script: |      yarn install    displayName: &amp;quot;Install dependencies&amp;quot;  - script: |      yarn build    displayName: &amp;quot;Gatsby build&amp;quot;  - task: CopyFiles@2    inputs:      sourceFolder: &amp;quot;public&amp;quot;      contents: &amp;quot;**&amp;quot;      targetFolder: &amp;quot;$(Build.ArtifactStagingDirectory)&amp;quot;      cleanTargetFolder: true    displayName: &amp;quot;Copy built site&amp;quot;    condition: and(succeeded(), ne(variables[&apos;Build.Reason&apos;], &apos;PullRequest&apos;))  - task: PublishBuildArtifacts@1    inputs:      PathtoPublish: &amp;quot;$(Build.ArtifactStagingDirectory)&amp;quot;      ArtifactName: &amp;quot;drop&amp;quot;      publishLocation: &amp;quot;Container&amp;quot;    condition: and(succeeded(), ne(variables[&apos;Build.Reason&apos;], &apos;PullRequest&apos;))    displayName: &amp;quot;Publish Build Artifacts&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This pipeline will run for pull request as well. In those cases we don’t need to build the artifacts. That’s why we put the below condition for &lt;strong&gt;CopyFiles@2&lt;/strong&gt; and &lt;strong&gt;PublishBuildArtifacts@1&lt;/strong&gt; tasks.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;condition&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;and(succeeded(), ne(variables[&amp;#39;Build.Reason&amp;#39;], &amp;#39;PullRequest&amp;#39;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;condition: and(succeeded(), ne(variables[&apos;Build.Reason&apos;], &apos;PullRequest&apos;))&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And a successfull build looks like,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/gatsby-build.sH1vvMVn_Z2fxkFE.webp&quot; alt=&quot;Azure DevOps Build Pipeline for Gatsby&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;905&quot; height=&quot;629&quot;&gt;&lt;figcaption&gt;Azure DevOps Build Pipeline for Gatsby&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;release-pipeline&quot;&gt;Release Pipeline&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#release-pipeline&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Once we configured our build pipeline, created a release pipeline.&lt;/p&gt;
&lt;h3 id=&quot;build-pipeline-vs-release-pipeline&quot;&gt;Build pipeline vs Release pipeline&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build-pipeline-vs-release-pipeline&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;A build is a pipeline that has no side-effects, it only takes in code and puts out compiled “artifacts”. A release is a pipeline that has side-effects, it takes in artifacts and publishes or deploys them to environments.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the release pipeline, in case of &lt;a href=&quot;https://www.smarterasp.net/index?r=100571651&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-gatsbyjs-build-pipeline&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmarterASP.NET&lt;/a&gt;, the stage contain one job and it has only one task, the &lt;strong&gt;FTP Upload&lt;/strong&gt;.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/release-pipeline.jpAHv85v_12L54g.webp&quot; alt=&quot;Release Pipeline for Gatsby&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1651&quot; height=&quot;666&quot;&gt;&lt;figcaption&gt;Release Pipeline for Gatsby&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And the yml for the same look like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;FtpUpload@2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;FTP Upload to SmarterASP.NET&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;credentialsOption&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;inputs&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;serverUrl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;$(FTP.ServerUrl)&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;username&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;$(FTP.Username)&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;password&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;$(FTP.Password)&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rootDirectory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;$(System.DefaultWorkingDirectory)/_Abhith.abhith.net/drop&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remoteDirectory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;/sitefolder/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;preservePaths&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;trustSSL&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;condition&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;and(succeeded(), ne(variables[&amp;#39;Build.Reason&amp;#39;], &amp;#39;PullRequest&amp;#39;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;``&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;steps:- task: FtpUpload@2  displayName: &apos;FTP Upload to SmarterASP.NET&apos;  inputs:    credentialsOption: inputs    serverUrl: &apos;$(FTP.ServerUrl)&apos;    username: &apos;$(FTP.Username)&apos;    password: &apos;$(FTP.Password)&apos;    rootDirectory: &apos;$(System.DefaultWorkingDirectory)/_Abhith.abhith.net/drop&apos;    remoteDirectory: /sitefolder/    preservePaths: true    trustSSL: true  condition: and(succeeded(), ne(variables[&apos;Build.Reason&apos;], &apos;PullRequest&apos;))``&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;notes&quot;&gt;Notes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#notes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;All the &lt;strong&gt;$(---)&lt;/strong&gt; are pipeline variables&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rootDirectory&lt;/strong&gt; can be browsed through the &lt;strong&gt;…&lt;/strong&gt; button near to the &lt;strong&gt;Root folder&lt;/strong&gt; text input (check the comments below)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even though I have successfully configured the CI/CD. But the time it took to complete the deployment was too long since the artifact size was high. The &lt;strong&gt;gatsby-images&lt;/strong&gt; generate so many versions of the image files resulting increase in the artifact size. So the FTP upload takes so much time to finish.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Tried &lt;a href=&quot;https://x.com/hashtag/AzureDevOps?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#AzureDevOps&lt;/a&gt; to do the build and FTP upload task to push the artifact to &lt;a href=&quot;https://x.com/smarterasp?ref_src=twsrc%5Etfw&quot;&gt;@smarterasp&lt;/a&gt;, it worked fine but the time took to complete the release is almost 2 hrs. (artifact is around 500 MB in size &amp;amp; number of files 📂 around 3k). &lt;a href=&quot;https://t.co/wcltxbObRj&quot;&gt;pic.twitter.com/wcltxbObRj&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1210656334338764802?ref_src=twsrc%5Etfw&quot;&gt;December 27, 2019&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;Because of this, I searched for another hosting provider and found out &lt;a href=&quot;https://render.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-devops-gatsbyjs-build-pipeline&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Render&lt;/a&gt;. They have a free plan for static sites and offers almost similar experience when comparing to Netlify.&lt;/p&gt;
&lt;p&gt;If you know any better hosting solution for GatsbyJs website, let me know in the comments. 👇&lt;/p&gt;</content:encoded><category>azure-devops</category><category>gatsby</category><category>hosting</category><author>Abhith Rajan</author></item><item><title>Azure DevOps Build - Could not locate the assembly</title><link>https://www.abhith.net/blog/azure-devops-build-could-not-locate-the-assembly/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-devops-build-could-not-locate-the-assembly/</guid><description>.NET Core build failing for Azure DevOps?  Check if there is any assembly reference and replace it with proper NuGet package.</description><pubDate>Thu, 23 Jan 2020 06:59:27 GMT</pubDate><content:encoded>&lt;p&gt;We were configuring CI/CD for one of our &lt;strong&gt;.NET Core 3.1&lt;/strong&gt; API project in the Azure DevOps. When trying &lt;code&gt;dotnet build&lt;/code&gt; from our local workstation, it was successfull but when CI triggered the build on the &lt;strong&gt;Azure DevOps&lt;/strong&gt;, it was failing.&lt;/p&gt;
&lt;p&gt;The Azure Pipeline yml looks like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;pool&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;vmImage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;windows-latest&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;variables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;buildConfiguration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Release&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;steps&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;DotNetCoreCLI@2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;dotnet build $(buildConfiguration)&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;inputs&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;command&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;build&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;projects&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;path/to/project/*.csproj&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;arguments&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;--configuration $(buildConfiguration)&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;pool:  vmImage: &amp;quot;windows-latest&amp;quot;variables:  buildConfiguration: &amp;quot;Release&amp;quot;steps:  - task: DotNetCoreCLI@2    displayName: &amp;quot;dotnet build $(buildConfiguration)&amp;quot;    inputs:      command: &amp;quot;build&amp;quot;      projects: |        path/to/project/*.csproj      arguments: &amp;quot;--configuration $(buildConfiguration)&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The build step successfully restored the NuGet packages which we can see in the logs,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;txt&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;Restore completed in 14.41 sec for d:\a\1\s\path\to\project\Project.Name.csproj.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Restore completed in 14.41 sec for d:\a\1\s\path\to\project\Project.Name.csproj.&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;But the step was failing with the following reference missing error.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C:\Program Files\dotnet\sdk\3.1.100\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.ComponentModel.Annotations”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [d:\a\1\s\path\to\project\Project.Name.csproj]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/azure-dev-ops-error.bgGh1zv7_ZNt3bk.webp&quot; alt=&quot;Azure DevOps Build Error&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1198&quot; height=&quot;474&quot;&gt;&lt;figcaption&gt;Azure DevOps Build Error&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;When checked the project reference, found out that the reference to &lt;code&gt;System.ComponentModel.Annotations&lt;/code&gt; was added from &lt;strong&gt;assembly&lt;/strong&gt; instead of Nuget. Fixed it by removing the assembly reference and adding the NuGet package of &lt;code&gt;System.ComponentModel.Annotations&lt;/code&gt;.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/azure-dev-ops-fix.BAROy18k_Z1irRQf.webp&quot; alt=&quot;DotNet Core Reference Fix&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1765&quot; height=&quot;645&quot;&gt;&lt;figcaption&gt;DotNet Core Reference Fix&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Commited the changes and initiated a hotfix release. Tada, the build succeeded.&lt;/p&gt;</content:encoded><category>azure-devops</category><category>aspnet-core</category><category>dotnet-core</category><author>Abhith Rajan</author></item><item><title>GatsbyJS - Add Google AdSense</title><link>https://www.abhith.net/blog/gatsbyjs-add-google-adsense/</link><guid isPermaLink="true">https://www.abhith.net/blog/gatsbyjs-add-google-adsense/</guid><description>Make use of GatsbyJS SSR APIs to integrate Google Adsense</description><pubDate>Sun, 05 Jan 2020 17:00:00 GMT</pubDate><content:encoded>&lt;p&gt;One of the major strengths of &lt;strong&gt;Gatsby&lt;/strong&gt; is its evolving plugins catalog.
And there are a couple of plugins found for &lt;strong&gt;Google AdSense&lt;/strong&gt; integration but don’t seem to be maintained for so long.
But peeking into the source code of the one pave the path to do the same without any plugins.&lt;/p&gt;
&lt;p&gt;All you have to do is, update your &lt;code&gt;gatsby-ssr.js&lt;/code&gt; with the below code (if there is no &lt;code&gt;gatsby-ssr.js&lt;/code&gt; file on your project directory then create one at the root).&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;React&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;react&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;onRenderBody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; ({ &lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;setHeadComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;setPostBodyComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; }) &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;pluginOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;googleAdClientId: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`ca-pub-XXXXXXXXXXXXXX`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//TODO: Replace with your client-Id&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;head: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Set to false if you prefer to have your adsense script loaded at the end of body instead of head.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;process&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;env&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;NODE_ENV&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`production`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;pluginOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;googleAdClientId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;undefined&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;setComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;pluginOptions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;head&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;setHeadComponents&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;setPostBodyComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;setComponents&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;([&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;async&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`gatsby-plugin-google-adsense`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;dangerouslySetInnerHTML&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;__html: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;(adsbygoogle = window.adsbygoogle || []).push({&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;google_ad_client: &amp;quot;${&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;pluginOptions&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;googleAdClientId&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;}&amp;quot;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;enable_page_level_ads: true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;import React from &amp;quot;react&amp;quot;;export const onRenderBody = ({ setHeadComponents, setPostBodyComponents }) =&gt; {  const pluginOptions = {    googleAdClientId: `ca-pub-XXXXXXXXXXXXXX`, //TODO: Replace with your client-Id    head: true, // Set to false if you prefer to have your adsense script loaded at the end of body instead of head.  };  if (process.env.NODE_ENV !== `production`) {    return null;  }  if (pluginOptions.googleAdClientId === undefined) {    return null;  }  const setComponents = pluginOptions.head    ? setHeadComponents    : setPostBodyComponents;  return setComponents([    &lt;script      async      type=&amp;quot;text/javascript&amp;quot;      src=&amp;quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&amp;quot;    /&gt;,    &lt;script      key={`gatsby-plugin-google-adsense`}      dangerouslySetInnerHTML={{        __html: `        (adsbygoogle = window.adsbygoogle || []).push({            google_ad_client: &amp;quot;${pluginOptions.googleAdClientId}&amp;quot;,            enable_page_level_ads: true        });        `,      }}    /&gt;,  ]);};&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;onRenderBody&lt;/strong&gt; is a Gatsby SSR API, called after every page Gatsby server renders while building HTML so you can set head and body components to be rendered in your html.js.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://www.gatsbyjs.org/docs/ssr-apis/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=gatsbyjs-add-google-adsense#onRenderBody&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SSR APIs | GatsbyJS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Build the project (&lt;code&gt;gatsby build&lt;/code&gt;) and see whether the AdSense snippet is present in the build output HTML.&lt;/p&gt;
&lt;p&gt;You can also refer the same used in my repo itself.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.com/abhith/abhith.net/blob/master/gatsby-ssr.js&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;abhith/abhith.net: Personal website running on Gatsby&lt;/a&gt;&lt;/p&gt;</content:encoded><category>gatsby</category><author>Abhith Rajan</author></item><item><title>.NET Core API Gateway Ocelot - Logging HTTP Requests &amp; Response Including Headers &amp; Body</title><link>https://www.abhith.net/blog/dotnet-core-api-gateway-ocelot-logging-http-requests-response-including-headers-body/</link><guid isPermaLink="true">https://www.abhith.net/blog/dotnet-core-api-gateway-ocelot-logging-http-requests-response-including-headers-body/</guid><description>Setup Ocelot API Gateway in ASP.NET Core and configure HTTP request and response logging including headers and body.</description><pubDate>Thu, 26 Dec 2019 17:11:27 GMT</pubDate><content:encoded>&lt;p&gt;We have many microservices running under one umbrella on production which is Azure Application Gateway and has only one endpoint for all. We are using path-based rules to route to each service.&lt;/p&gt;
&lt;p&gt;During development, we may need to simulate the same experience, i.e one endpoint instead of we referring separate URL endpoint for each service.&lt;/p&gt;
&lt;p&gt;For the microservices, I used to refer &lt;a href=&quot;https://github.com/dotnet-architecture/eShopOnContainers?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dotnet-core-api-gateway-ocelot-logging-http-requests-response-including-headers-body&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;dotnet-architecture/eShopOnContainers&lt;/a&gt;. And I read about the Ocelot API gateway from there. So I set up a local API gateway using Ocelot, for that&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Created a new &lt;strong&gt;ASP.NET Core 3.1&lt;/strong&gt; web application and choose the Empty template.&lt;/li&gt;
&lt;li&gt;Added the following NuGet packages&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PackageReference&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Ocelot&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;13.8.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PackageReference&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Serilog&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;2.9.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PackageReference&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Serilog.AspNetCore&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;3.2.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PackageReference&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Serilog.Sinks.File&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;4.1.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;PackageReference Include=&amp;quot;Ocelot&amp;quot; Version=&amp;quot;13.8.0&amp;quot; /&gt;&lt;PackageReference Include=&amp;quot;Serilog&amp;quot; Version=&amp;quot;2.9.0&amp;quot; /&gt;&lt;PackageReference Include=&amp;quot;Serilog.AspNetCore&amp;quot; Version=&amp;quot;3.2.0&amp;quot; /&gt;&lt;PackageReference Include=&amp;quot;Serilog.Sinks.File&amp;quot; Version=&amp;quot;4.1.0&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Updated the Program.cs&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IO&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AspNetCore&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AspNetCore&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Hosting&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Extensions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Extensions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Hosting&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Extensions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DependencyInjection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Serilog&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Serilog&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Events&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Ocelot&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DependencyInjection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Ocelot&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Middleware&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AspNetCore&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OcelotApiGw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Middlewares&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OcelotApiGw&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Program&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IWebHost&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;BuildWebHost&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;[] &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WebHost&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateDefaultBuilder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Ocelot configuration file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ConfigureAppConfiguration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;                          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;ic&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ic&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddJsonFile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Path&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Combine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;configuration&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                                                            &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;configuration.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ConfigureServices&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddSingleton&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddOcelot&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;UseStartup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Startup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;UseSerilog&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;_&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;config&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;config&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;MinimumLevel&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Information&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;MinimumLevel&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Override&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Microsoft&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;LogEventLevel&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Warning&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Enrich&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FromLogContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WriteTo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;@&amp;quot;Logs\log.txt&amp;quot;&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;rollingInterval&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;RollingInterval&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Day&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Configure&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;UseMiddleware&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RequestResponseLoggingMiddleware&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;UseOcelot&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Wait&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Main&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;[] &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;BuildWebHost&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using System.IO;using Microsoft.AspNetCore;using Microsoft.AspNetCore.Hosting;using Microsoft.Extensions.Configuration;using Microsoft.Extensions.Hosting;using Microsoft.Extensions.DependencyInjection;using Serilog;using Serilog.Events;using Ocelot.DependencyInjection;using Ocelot.Middleware;using Microsoft.AspNetCore.Builder;using OcelotApiGw.Middlewares;namespace OcelotApiGw{    public class Program    {        public static IWebHost BuildWebHost(string[] args)        {            var builder = WebHost.CreateDefaultBuilder(args);            // Ocelot configuration file            builder.ConfigureAppConfiguration(                          ic =&gt; ic.AddJsonFile(Path.Combine(&amp;quot;configuration&amp;quot;,                                                            &amp;quot;configuration.json&amp;quot;)))                    .ConfigureServices(s =&gt;                    {                        s.AddSingleton(builder);                        s.AddOcelot();                    })                    .UseStartup&lt;Startup&gt;()                    .UseSerilog((_, config) =&gt;                    {                        config                            .MinimumLevel.Information()                            .MinimumLevel.Override(&amp;quot;Microsoft&amp;quot;, LogEventLevel.Warning)                            .Enrich.FromLogContext()                            .WriteTo.File(@&amp;quot;Logs\log.txt&amp;quot;, rollingInterval: RollingInterval.Day);                    })                    .Configure(app =&gt;                    {                        app.UseMiddleware&lt;RequestResponseLoggingMiddleware&gt;();                        app.UseOcelot().Wait();                    });            var host = builder.Build();            return host;        }        public static void Main(string[] args)        {            BuildWebHost(args).Run();        }    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Here we are configuring the Ocelot middleware as well as Serilog for logging.
The Ocelot configuration file is added under “configuration” folder in the root directory.&lt;/p&gt;
&lt;p&gt;A sample Ocelot configuration file looks like this.&lt;/p&gt;
&lt;h2 id=&quot;configurationjson&quot;&gt;configuration.json&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#configurationjson&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;ReRoutes&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamPathTemplate&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/{version}/{everything}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamScheme&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamHostAndPorts&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Host&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Port&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;5010&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UpstreamPathTemplate&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/d/{version}/{everything}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UpstreamHttpMethod&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;PUT&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamPathTemplate&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/b/{everything}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamScheme&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamHostAndPorts&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Host&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Port&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;5011&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UpstreamPathTemplate&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/a/b/{everything}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UpstreamHttpMethod&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;PUT&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamPathTemplate&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/{everything}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamScheme&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;DownstreamHostAndPorts&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Host&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;Port&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;5013&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UpstreamPathTemplate&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/c/{everything}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;UpstreamHttpMethod&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;PUT&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;OPTIONS&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;GlobalConfiguration&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;BaseUrl&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://localhost:44390&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{  &amp;quot;ReRoutes&amp;quot;: [    {      &amp;quot;DownstreamPathTemplate&amp;quot;: &amp;quot;/{version}/{everything}&amp;quot;,      &amp;quot;DownstreamScheme&amp;quot;: &amp;quot;http&amp;quot;,      &amp;quot;DownstreamHostAndPorts&amp;quot;: [        {          &amp;quot;Host&amp;quot;: &amp;quot;localhost&amp;quot;,          &amp;quot;Port&amp;quot;: 5010        }      ],      &amp;quot;UpstreamPathTemplate&amp;quot;: &amp;quot;/d/{version}/{everything}&amp;quot;,      &amp;quot;UpstreamHttpMethod&amp;quot;: [&amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;GET&amp;quot;]    },    {      &amp;quot;DownstreamPathTemplate&amp;quot;: &amp;quot;/b/{everything}&amp;quot;,      &amp;quot;DownstreamScheme&amp;quot;: &amp;quot;http&amp;quot;,      &amp;quot;DownstreamHostAndPorts&amp;quot;: [        {          &amp;quot;Host&amp;quot;: &amp;quot;localhost&amp;quot;,          &amp;quot;Port&amp;quot;: 5011        }      ],      &amp;quot;UpstreamPathTemplate&amp;quot;: &amp;quot;/a/b/{everything}&amp;quot;,      &amp;quot;UpstreamHttpMethod&amp;quot;: [&amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;GET&amp;quot;]    },    {      &amp;quot;DownstreamPathTemplate&amp;quot;: &amp;quot;/{everything}&amp;quot;,      &amp;quot;DownstreamScheme&amp;quot;: &amp;quot;http&amp;quot;,      &amp;quot;DownstreamHostAndPorts&amp;quot;: [        {          &amp;quot;Host&amp;quot;: &amp;quot;localhost&amp;quot;,          &amp;quot;Port&amp;quot;: 5013        }      ],      &amp;quot;UpstreamPathTemplate&amp;quot;: &amp;quot;/c/{everything}&amp;quot;,      &amp;quot;UpstreamHttpMethod&amp;quot;: [&amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;GET&amp;quot;, &amp;quot;OPTIONS&amp;quot;]    }  ],  &amp;quot;GlobalConfiguration&amp;quot;: {    &amp;quot;BaseUrl&amp;quot;: &amp;quot;https://localhost:44390&amp;quot;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Apart from that, we are also adding one custom middleware &lt;code&gt;RequestResponseLoggingMiddleware&lt;/code&gt; and its purpose is clear from its name, log request and response.&lt;/p&gt;
&lt;h2 id=&quot;the-logging-middleware&quot;&gt;The Logging Middleware&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-logging-middleware&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a slightly modified version of middleware mentioned in the article, &lt;a href=&quot;https://exceptionnotfound.net/using-middleware-to-log-requests-and-responses-in-asp-net-core/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dotnet-core-api-gateway-ocelot-logging-http-requests-response-including-headers-body&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Using Middleware in ASP.NET Core to Log Requests and Responses&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AspNetCore&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Http&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Microsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Extensions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Logging&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IO&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Threading&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Tasks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OcelotApiGw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Middlewares&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RequestResponseLoggingMiddleware&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;readonly&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ILogger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RequestResponseLoggingMiddleware&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;_logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;readonly&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RequestDelegate&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;_next&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;RequestResponseLoggingMiddleware&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RequestDelegate&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ILogger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;RequestResponseLoggingMiddleware&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_next&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;InvokeAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;HttpContext&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;EnableBuffering&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;StringBuilder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FormatRequest&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Append&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Request: &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AppendLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AppendLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Request headers:&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Append&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Key&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Append&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;:&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AppendLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Copy a pointer to the original response body stream&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;originalBodyStream&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Create a new memory stream...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;responseBody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;MemoryStream&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//...and use that for the temporary response body&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;responseBody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Continue down the Middleware pipeline, eventually returning to this class&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;_next&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Format the response from the server&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FormatResponse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Append&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Response: &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AppendLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AppendLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Response headers: &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Append&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Key&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Append&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;:&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AppendLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Save log to chosen datastore&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;LogInformation&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;builder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;());&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Copy the contents of the new memory stream (which contains the response) to the original stream, which is then returned to the client.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;responseBody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CopyToAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;originalBodyStream&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FormatRequest&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;HttpRequest&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Leave the body open so the next middleware can read it.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;reader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;StreamReader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Encoding&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;UTF8&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;detectEncodingFromByteOrderMarks&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;leaveOpen&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;reader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ReadToEndAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Do some processing with body…&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;formattedRequest&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Scheme&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Host&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Path&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;QueryString&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Reset the request body stream position so the next middleware can read it&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Position&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;formattedRequest&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FormatResponse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;HttpResponse&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//We need to read the response stream from the beginning...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Seek&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;SeekOrigin&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Begin&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//...and copy it into a string&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;StreamReader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ReadToEndAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//We need to reset the reader for the response so that the client can read it.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Body&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Seek&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;SeekOrigin&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Begin&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;//Return the string for the response, including the status code (e.g. 200, 404, 401, etc.)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StatusCode&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Microsoft.AspNetCore.Http;using Microsoft.Extensions.Logging;using System.IO;using System.Text;using System.Threading.Tasks;namespace OcelotApiGw.Middlewares{    public class RequestResponseLoggingMiddleware    {        private readonly ILogger&lt;RequestResponseLoggingMiddleware&gt; _logger;        private readonly RequestDelegate _next;        public RequestResponseLoggingMiddleware(RequestDelegate next, ILogger&lt;RequestResponseLoggingMiddleware&gt; logger)        {            _next = next;            _logger = logger;        }        public async Task InvokeAsync(HttpContext context)        {            context.Request.EnableBuffering();            var builder = new StringBuilder();            var request = await FormatRequest(context.Request);            builder.Append(&amp;quot;Request: &amp;quot;).AppendLine(request);            builder.AppendLine(&amp;quot;Request headers:&amp;quot;);            foreach (var header in context.Request.Headers)            {                builder.Append(header.Key).Append(&apos;:&apos;).AppendLine(header.Value);            }            //Copy a pointer to the original response body stream            var originalBodyStream = context.Response.Body;            //Create a new memory stream...            using var responseBody = new MemoryStream();            //...and use that for the temporary response body            context.Response.Body = responseBody;            //Continue down the Middleware pipeline, eventually returning to this class            await _next(context);            //Format the response from the server            var response = await FormatResponse(context.Response);            builder.Append(&amp;quot;Response: &amp;quot;).AppendLine(response);            builder.AppendLine(&amp;quot;Response headers: &amp;quot;);            foreach (var header in context.Response.Headers)            {                builder.Append(header.Key).Append(&apos;:&apos;).AppendLine(header.Value);            }            //Save log to chosen datastore            _logger.LogInformation(builder.ToString());            //Copy the contents of the new memory stream (which contains the response) to the original stream, which is then returned to the client.            await responseBody.CopyToAsync(originalBodyStream);        }        private async Task&lt;string&gt; FormatRequest(HttpRequest request)        {            // Leave the body open so the next middleware can read it.            using var reader = new StreamReader(                request.Body,                encoding: Encoding.UTF8,                detectEncodingFromByteOrderMarks: false,                leaveOpen: true);            var body = await reader.ReadToEndAsync();            // Do some processing with body…            var formattedRequest = $&amp;quot;{request.Scheme} {request.Host}{request.Path} {request.QueryString} {body}&amp;quot;;            // Reset the request body stream position so the next middleware can read it            request.Body.Position = 0;            return formattedRequest;        }        private async Task&lt;string&gt; FormatResponse(HttpResponse response)        {            //We need to read the response stream from the beginning...            response.Body.Seek(0, SeekOrigin.Begin);            //...and copy it into a string            string text = await new StreamReader(response.Body).ReadToEndAsync();            //We need to reset the reader for the response so that the client can read it.            response.Body.Seek(0, SeekOrigin.Begin);            //Return the string for the response, including the status code (e.g. 200, 404, 401, etc.)            return $&amp;quot;{response.StatusCode}: {text}&amp;quot;;        }    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Usually, the request body can be read only once. Here we are making use of the new &lt;code&gt;EnableBuffering&lt;/code&gt; extension method to read the request body multiple times.
You can read more about the feature here, &lt;a href=&quot;https://devblogs.microsoft.com/aspnet/re-reading-asp-net-core-request-bodies-with-enablebuffering/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dotnet-core-api-gateway-ocelot-logging-http-requests-response-including-headers-body&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Re-reading ASP.Net Core request bodies with EnableBuffering()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;That’s it, run your projects, make some requests and then check the logs directory.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This logging middleware can be used in any other &lt;strong&gt;ASP.NET Core&lt;/strong&gt; project.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here we used in the Ocelot API Gateway so that we don’t need to check the logs of each microservices.&lt;/p&gt;
&lt;h2 id=&quot;bonus&quot;&gt;Bonus&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bonus&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I am using a free tool &lt;a href=&quot;https://kittyfisto.github.io/Tailviewer/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dotnet-core-api-gateway-ocelot-logging-http-requests-response-including-headers-body&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Tailviewer&lt;/a&gt; to go through my logs. Check it out, it is small in size also an opensource project.&lt;/p&gt;</content:encoded><category>aspnet-core</category><category>api</category><category>api-management</category><author>Abhith Rajan</author></item><item><title>SQL Server - Delete Duplicate Rows</title><link>https://www.abhith.net/blog/sql-server-delete-duplicate-rows/</link><guid isPermaLink="true">https://www.abhith.net/blog/sql-server-delete-duplicate-rows/</guid><description>Delete duplicate records from a SQL server table without primary keys or any unique columns.</description><pubDate>Wed, 04 Dec 2019 20:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Deleting rows from a &lt;strong&gt;SQL Server&lt;/strong&gt; table is no big deal. But it becomes a little complicated when we are in a situation like a table with no primary keys or unique column and it has duplicate records which we need to delete.&lt;/p&gt;
&lt;p&gt;When tried to delete rows using the context menu in the &lt;strong&gt;Microsoft SQL Server Management Studio&lt;/strong&gt;, it failed with an error message indicating the action affects multiple records.
But if you try &lt;strong&gt;Azure Data Studio&lt;/strong&gt; to do the same, it will delete all the similar rows, not just the one you choose to delete.&lt;/p&gt;
&lt;p&gt;So, in this case, we can use a query like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; CTE &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Col1]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,[Col2]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;ROW_NUMBER&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OVER&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;PARTITION&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Col1] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ORDER BY&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Col1]) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; RN&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [dbo].[Table]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; CTE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot; WITH CTE AS(   SELECT [Col1]      ,[Col2]      ,...      ,ROW_NUMBER() OVER(PARTITION BY [Col1] ORDER BY [Col1]) AS RN   FROM [dbo].[Table])SELECT * FROM CTE&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above query, we are using a CTE to list the data along with an additional column &lt;em&gt;RN&lt;/em&gt; which will have a value higher than 1 for the duplicate entries.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is always a good idea to “SELECT” and double-check the data before doing a hard “DELETE”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So first run the above query and inspect the rows with &lt;code&gt;RN&amp;gt;1&lt;/code&gt;,
Once you are okay with the results, execute the delete.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; CTE &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Col1]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,[Col2]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;ROW_NUMBER&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OVER&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;PARTITION&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Col1] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ORDER BY&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Col1]) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; RN&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [dbo].[Table]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; CTE &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; RN &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot; WITH CTE AS(   SELECT [Col1]      ,[Col2]      ,...      ,ROW_NUMBER() OVER(PARTITION BY [Col1] ORDER BY [Col1]) AS RN   FROM [dbo].[Table])DELETE FROM CTE WHERE RN &gt; 1&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;see-also&quot;&gt;See Also&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#see-also&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-ver15&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=sql-server-delete-duplicate-rows&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;WITH common_table_expression (Transact-SQL) - SQL Server&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>sql-server</category><author>Abhith Rajan</author></item><item><title>Angular - Add Custom Font</title><link>https://www.abhith.net/blog/angular-add-custom-font/</link><guid isPermaLink="true">https://www.abhith.net/blog/angular-add-custom-font/</guid><description>A short article about how to add custom font files to your Angular projects.</description><pubDate>Tue, 12 Nov 2019 12:59:27 GMT</pubDate><content:encoded>&lt;p&gt;To add custom fonts to your &lt;strong&gt;Angular&lt;/strong&gt; project, put the font files under &lt;code&gt;src&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Here I am following the folder pattern which I found on ABP Zero boilerplate.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my case &lt;code&gt;src &amp;gt; assets &amp;gt; fonts &amp;gt; fontname &amp;gt; font-files (.woff)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Then create a &lt;strong&gt;CSS&lt;/strong&gt; file, &lt;code&gt;src &amp;gt; assets &amp;gt; fonts &amp;gt; fonts-fontname.css&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And on the CSS, add the &lt;code&gt;font-face&lt;/code&gt; referring to our new font-flies, an example is given below.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;@font-face&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;fontname&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;./fontname/fontname.woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;@font-face&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;fontname-Medium&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;./fontname/fontname-medium.woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;@font-face&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;fontname-Light&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;./fontname/fontname-light.woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@font-face {  font-family: &amp;quot;fontname&amp;quot;;  src: url(&amp;quot;./fontname/fontname.woff&amp;quot;);}@font-face {  font-family: &amp;quot;fontname-Medium&amp;quot;;  src: url(&amp;quot;./fontname/fontname-medium.woff&amp;quot;);}@font-face {  font-family: &amp;quot;fontname-Light&amp;quot;;  src: url(&amp;quot;./fontname/fontname-light.woff&amp;quot;);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Once the CSS file is ready, now we have to include that too in the angular build.
To do that, update the &lt;code&gt;angular.json&lt;/code&gt; to have references to our new CSS file like in below example,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;projects&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;project-name&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;architect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;build&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;options&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;styles&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;src/assets/fonts/fonts-fontname.css&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;test&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;options&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;&amp;quot;styles&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;src/assets/fonts/fonts-fontname.css&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{ ...  &amp;quot;projects&amp;quot;: {    &amp;quot;project-name&amp;quot;: {     ...      &amp;quot;architect&amp;quot;: {        &amp;quot;build&amp;quot;: {          ...          &amp;quot;options&amp;quot;: {            ...            &amp;quot;styles&amp;quot;: [              ...              &amp;quot;src/assets/fonts/fonts-fontname.css&amp;quot;,              ...            ],            ...          },          ...        },        ...,        &amp;quot;test&amp;quot;: {          ...          &amp;quot;options&amp;quot;: {            ...            &amp;quot;styles&amp;quot;: [              ...              &amp;quot;src/assets/fonts/fonts-fontname.css&amp;quot;,              ...            ],            ...          }        },        ...      }    },}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Note: the above code is tried and tested on &lt;strong&gt;Angular 8&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Once we updated the &lt;code&gt;angular.json&lt;/code&gt;, start a new build and see the new font applied in the places where it is used.&lt;/p&gt;</content:encoded><category>angular</category><author>Abhith Rajan</author></item><item><title>C# - Convert DateTime to Long and Vice Versa</title><link>https://www.abhith.net/blog/c-sharp-convert-datetime-to-long-and-vice-versa/</link><guid isPermaLink="true">https://www.abhith.net/blog/c-sharp-convert-datetime-to-long-and-vice-versa/</guid><description>Transform datetime to long or long to datetime in C#.</description><pubDate>Tue, 29 Oct 2019 18:26:00 GMT</pubDate><content:encoded>&lt;p&gt;Story behind this post is when I started working with an existing MSSQL DB, I had to convert the DateTime to long since action auditing fields such as CreationTime, LastUpdated etc was stored as numeric.&lt;/p&gt;
&lt;p&gt;eg, 20191028091320.&lt;/p&gt;
&lt;p&gt;First of all, I don’t like storing DateTime in numeric format like above, which brings so much overhead during dealing with the same field, like querying based on date, formatting for displaying etc.&lt;/p&gt;
&lt;p&gt;The way I handled these conversions given below,&lt;/p&gt;
&lt;h3 id=&quot;datetime-to-long&quot;&gt;DateTime to Long&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#datetime-to-long&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;long&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Parse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;UtcNow&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;yyyyMMddHHmmss&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;long.Parse(DateTime.UtcNow.ToString(&amp;quot;yyyyMMddHHmmss&amp;quot;))&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;long-to-datetime&quot;&gt;Long to DateTime&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#long-to-datetime&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The below code can handle 14 digits (eg. 20191028091320), 16 digits (eg. 2019102809132000 ) and 8 digits (eg. 20191028).&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;? &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetDateTimeFromInt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;long&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;? &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dateAsLong&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;hasTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dateAsLong&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;HasValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dateAsLong&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;hasTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// sometimes input is 14 digit and sometimes 16&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;numberOfDigits&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Math&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Floor&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Math&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Log10&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dateAsLong&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;numberOfDigits&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;14&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dateAsLong&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;/=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Math&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Pow&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;numberOfDigits&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;14&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;TryParseExact&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dateAsLong&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(), &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;hasTime&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;yyyyMMddHHmmss&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;yyyyMMdd&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                                  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CultureInfo&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;InvariantCulture&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                                  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DateTimeStyles&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;None&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DateTime&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;private static DateTime? GetDateTimeFromInt(long? dateAsLong, bool hasTime = true){    if (dateAsLong.HasValue &amp;amp;&amp;amp; dateAsLong &gt; 0)    {        if (hasTime)        {            // sometimes input is 14 digit and sometimes 16            var numberOfDigits = (int)Math.Floor(Math.Log10(dateAsLong.Value) + 1);            if (numberOfDigits &gt; 14)            {                dateAsLong /= (int)Math.Pow(10, (numberOfDigits - 14));            }        }        if (DateTime.TryParseExact(dateAsLong.ToString(), hasTime ? &amp;quot;yyyyMMddHHmmss&amp;quot; : &amp;quot;yyyyMMdd&amp;quot;,                                  CultureInfo.InvariantCulture,                                  DateTimeStyles.None, out DateTime dt))        {            return dt;        }    }    return null;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>c-sharp</category><author>Abhith Rajan</author></item><item><title>Gatsby - See All Generated Pages</title><link>https://www.abhith.net/blog/gatsby-see-all-generated-pages/</link><guid isPermaLink="true">https://www.abhith.net/blog/gatsby-see-all-generated-pages/</guid><description>See all the pages generated by Gatsby.</description><pubDate>Sat, 05 Oct 2019 20:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you want to see the list of pages generated by Gatsby, you can use the GraphiQL playground part of the Gatsby Dev (usually served on &lt;a href=&quot;http://localhost:8000/___graphql?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=gatsby-see-all-generated-pages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;http://localhost:8000/___graphql&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Run the below query and you will be presented with the list of pages,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;graphql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;query&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;MyQuery&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70;--2:#54666C&quot;&gt;allSitePage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70;--2:#54666C&quot;&gt;edges&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70;--2:#54666C&quot;&gt;node&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70;--2:#54666C&quot;&gt;path&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;query MyQuery {  allSitePage {    edges {      node {        path      }    }  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>gatsby</category><author>Abhith Rajan</author></item><item><title>Azure - Configuring End-to-End SSL for IIS Website by using Application Gateway</title><link>https://www.abhith.net/blog/azure-configuring-end-to-end-ssl-for-iis-website-by-using-application-gateway/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-configuring-end-to-end-ssl-for-iis-website-by-using-application-gateway/</guid><description>This article brief about the steps involved in making an end to end HTTPS website which hosted in a VM IIS, in Azure and the traffic need to be routed via Application Gateway.</description><pubDate>Tue, 24 Sep 2019 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;For most cases we do SSL offloading at the Application Gateway end. i.e, HTTPS traffic between public and application gateway, HTTP traffic between application gateway and websites hosted under it. But in some cases we need end to end SSL. In our case, it was for the Identity Server.&lt;/p&gt;
&lt;p&gt;So lets start, We pointed the domain to the Application Gateway Public IP and We assume you purchased the SSL for your domain and we need the SSL certificate in two formats.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;PFX&lt;/strong&gt; format for application gateway HTTPS listener.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CER&lt;/strong&gt; format for application gateway HTTP Settings.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now we need to do the following,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add an HTTPS listener for that domain with the Certificate.&lt;/li&gt;
&lt;li&gt;Create a backend pool with the VM where we will publish the website in the IIS.&lt;/li&gt;
&lt;li&gt;Add an HTTP Settings with the Certificate as shown in the picture.&lt;/li&gt;
&lt;/ol&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/application-gateway-http-settings.pCpvYfI0_Z2fXiRN.webp&quot; alt=&quot;Application Gateway HTTP Settings&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;725&quot; height=&quot;871&quot;&gt;&lt;figcaption&gt;Application Gateway HTTP Settings&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Create a rule which connects the listener (1) and backend pool(2) via the newly created HTTP settings (3).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once all this done, user will be able to hit Application Gateway with HTTPS and probably will see 404 since the VM not responding to the requests. So lets configure the VM to accept the traffic through 443 port. In the VM,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install the SSL certificate.&lt;/li&gt;
&lt;li&gt;Configure the HTTPS website in the IIS with that certificate and the hostname (domain).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After this done, check whether you are able to reach the website successfully. If you are getting any 502 errors, check the following&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the Application Gateway, check the unhealthy backend pools.&lt;/li&gt;
&lt;li&gt;If our backend pool with the HTTPS HTTP settings name is in that unhealthy list, that indicates the VM in the backend pool not responding 200 back to the health probe check.&lt;/li&gt;
&lt;li&gt;By default health probe check for HTTPS will sent health check requests to the VM’s IP on 443 port, and in the IIS, no website will be listening for 443 port (Without any hostname specified).&lt;/li&gt;
&lt;li&gt;To overcome, all we have to do is, on the default website (if there is no default site, add another binding to our site) as shown below,&lt;/li&gt;
&lt;/ul&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/iis-https-default.DvteuCqQ_1r5JHI.webp&quot; alt=&quot;IIS default 443 port binding&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;634&quot; height=&quot;194&quot;&gt;&lt;figcaption&gt;IIS default 443 port binding&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Once this done, watch the unhealthy backend pools and you may notice that our backend pool is healthy now (It will take at least 30 seconds to update). Now application gateway will route traffic to our VM over HTTPS and the VM will serve the website and we are done.&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/application-gateway/end-to-end-ssl-portal?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-configuring-end-to-end-ssl-for-iis-website-by-using-application-gateway&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Quickstart - Configure end-to-end SSL encryption with Azure Application Gateway - Azure portal | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>azure</category><category>iis</category><category>azure-application-gateway</category><author>Abhith Rajan</author></item><item><title>C# - Get Last N characters from a string</title><link>https://www.abhith.net/blog/c-sharp-get-last-n-characters-from-a-string/</link><guid isPermaLink="true">https://www.abhith.net/blog/c-sharp-get-last-n-characters-from-a-string/</guid><description>A simple C# extension method which use Substring to get the last N characters in a string.</description><pubDate>Sun, 22 Sep 2019 19:26:00 GMT</pubDate><content:encoded>&lt;p&gt;In C#, &lt;strong&gt;Substring&lt;/strong&gt; method is used to retrieve (as the name suggests) substring from a string. The same we can use to get the last ‘N’ characters of a string.&lt;/p&gt;
&lt;h3 id=&quot;stringsubstring-method&quot;&gt;String.Substring Method&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#stringsubstring-method&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As described in &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/api/system.string.substring?view=netframework-4.8&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=c-sharp-get-last-n-characters-from-a-string&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;String.Substring Method (System) | Microsoft Docs&lt;/a&gt;, Substring method has two overloads,&lt;/p&gt;

















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Overload&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Substring(Int32)&lt;/td&gt;&lt;td&gt;Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Substring(Int32, Int32)&lt;/td&gt;&lt;td&gt;Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;With the starting position only overload, we can do.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;mystring&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Substring&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;mystring&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Length&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;mystring.Substring(mystring.Length - N);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;But the above code will fail in case &lt;code&gt;mystring&lt;/code&gt; length is lower than the ‘N’. So considering that case, lets have an extension method,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetLast&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;numberOfChars&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;numberOfChars&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Length&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Substring&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Length&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;numberOfChars&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public static string GetLast(this string source, int numberOfChars){    if(numberOfChars &gt;= source.Length)      return source;    return source.Substring(source.Length - numberOfChars);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And you can use the above like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;mystring&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetLast&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;mystring.GetLast(5)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This extension method is now part of the &lt;a href=&quot;https://code-library.abhith.net/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=c-sharp-get-last-n-characters-from-a-string&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Code.Library&lt;/a&gt; Nuget package.&lt;/p&gt;</content:encoded><category>c-sharp</category><author>Abhith Rajan</author></item><item><title>ASP.NET Core - Return 500 (Internal Server Error) or any other Status Code from API</title><link>https://www.abhith.net/blog/aspnet-core-return-500-internal-server-error-or-any-other-status-code-from-api/</link><guid isPermaLink="true">https://www.abhith.net/blog/aspnet-core-return-500-internal-server-error-or-any-other-status-code-from-api/</guid><description>A good REST API will respond with proper HTTP status codes. In ASP.NET Core, returning status code is easier than you might think.</description><pubDate>Mon, 16 Sep 2019 19:26:00 GMT</pubDate><content:encoded>&lt;p&gt;HTTP response status codes have so much importance in REST API’s.
In any case if you want to return a status code from your &lt;strong&gt;ASP.NET Core&lt;/strong&gt; API, all you have to do is in your controller method,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;csharp&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;StatusCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StatusCodes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Status500InternalServerError&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;return  StatusCode(StatusCodes.Status500InternalServerError);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;StatusCode&lt;/strong&gt; is from &lt;strong&gt;Microsoft.AspNetCore.Mvc.ControllerBase.StatusCode&lt;/strong&gt; and &lt;strong&gt;StatusCodes&lt;/strong&gt; from &lt;strong&gt;Microsoft.AspNetCore.Http.StatusCodes&lt;/strong&gt;.
The above code will return a 500 status code. Similar way, you can return any other status code. For the complete list,&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.statuscodes?view=aspnetcore-2.2&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-return-500-internal-server-error-or-any-other-status-code-from-api&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;StatusCodes Class (Microsoft.AspNetCore.Http) | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HTTP status code 5xx indicates server error. 5xx series includes,&lt;/p&gt;






































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Status Code&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;ASP.NET Core 2.2&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;Internal Server Error&lt;/td&gt;&lt;td&gt;Status500InternalServerError&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;501&lt;/td&gt;&lt;td&gt;Not Implemented&lt;/td&gt;&lt;td&gt;Status501NotImplemented&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;502&lt;/td&gt;&lt;td&gt;Bad Gateway&lt;/td&gt;&lt;td&gt;Status502BadGateway&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;503&lt;/td&gt;&lt;td&gt;Service Unavailable&lt;/td&gt;&lt;td&gt;Status503ServiceUnavailable&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;504&lt;/td&gt;&lt;td&gt;Gateway Timeout&lt;/td&gt;&lt;td&gt;Status504GatewayTimeout&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;505&lt;/td&gt;&lt;td&gt;HTTP Version Not Supported&lt;/td&gt;&lt;td&gt;Status505HttpVersionNotsupported&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;506&lt;/td&gt;&lt;td&gt;Variant Also Negotiates&lt;/td&gt;&lt;td&gt;Status506VariantAlsoNegotiates&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;507&lt;/td&gt;&lt;td&gt;Insufficient Storage&lt;/td&gt;&lt;td&gt;Status507InsufficientStorage&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;508&lt;/td&gt;&lt;td&gt;Loop Detected&lt;/td&gt;&lt;td&gt;Status508LoopDetected&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;510&lt;/td&gt;&lt;td&gt;Not Extended&lt;/td&gt;&lt;td&gt;Status510NotExtended&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;511&lt;/td&gt;&lt;td&gt;Network Authentication Required&lt;/td&gt;&lt;td&gt;Status511NetworkAuthenticationRequired&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;599&lt;/td&gt;&lt;td&gt;Network Connect Timeout Error&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;You can also return some additional data along with the status code. Here is an example,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Route&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{code}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;HttpGet&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ProducesResponseType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Merchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;), &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ActionResult&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetMerchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;code&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;EntityRequestDto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;code&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_merchantService&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetMerchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;IsSuccess&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Ok&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_logger&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;LogError&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;FAILED: GetMerchant - ${result.Error}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;StatusCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StatusCodes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Status500InternalServerError&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Error&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;[Route(&amp;quot;{code}&amp;quot;)][HttpGet][ProducesResponseType(typeof(Merchant), 200)]public async Task&lt;ActionResult&gt; GetMerchant(string code){    var input = new EntityRequestDto&lt;string&gt;    {        Id = code    };    var result = await _merchantService.GetMerchant(input);    if (result.IsSuccess)    {        return Ok(result.Value);    }    _logger.LogError(&amp;quot;FAILED: GetMerchant - ${result.Error}&amp;quot;);    return StatusCode(StatusCodes.Status500InternalServerError, result.Error);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If another service which is a client of the above API, they can get the additional info by,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;MerchantPreviewDto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetMerchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;merchantCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;try&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;merchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_apiBaseUri&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;/api/v1/merchants/&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;merchantCode&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;WithOAuthBearerToken&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetJsonAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Merchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;().&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ConfigureAwait&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ObjectMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;MerchantPreviewDto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;merchant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;FlurlHttpException&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;ex&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ex&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetResponseStringAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;UserFriendlyException&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Oops! There is a problem!&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;error&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public async Task&lt;MerchantPreviewDto&gt; GetMerchant(string merchantCode){    try    {        var merchant = await $&amp;quot;{_apiBaseUri}/api/v1/merchants/{merchantCode}&amp;quot;            .WithOAuthBearerToken(...)            .GetJsonAsync&lt;Merchant&gt;().ConfigureAwait(false);        return ObjectMapper.Map&lt;MerchantPreviewDto&gt;(merchant);    }    catch (FlurlHttpException ex)    {        var error = await ex.GetResponseStringAsync();        throw new UserFriendlyException(&amp;quot;Oops! There is a problem!&amp;quot;, error);    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;hr/&gt;
&lt;h3 id=&quot;bonus&quot;&gt;Bonus&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bonus&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;On the client service, I am using &lt;strong&gt;&lt;a href=&quot;https://flurl.dev/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=aspnet-core-return-500-internal-server-error-or-any-other-status-code-from-api&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Flurl&lt;/a&gt;&lt;/strong&gt;, which is my favorite HTTP client.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Flurl is a modern, fluent, asynchronous, testable, portable, buzzword-laden URL builder and HTTP client library for .NET.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which one is your favorite HTTP client library for .NET?&lt;/p&gt;</content:encoded><category>aspnet-core</category><category>api</category><author>Abhith Rajan</author></item><item><title>C# - Get Web.Config Connection String in a Class Library</title><link>https://www.abhith.net/blog/c-sharp-get-web-config-connection-string-in-a-class-library/</link><guid isPermaLink="true">https://www.abhith.net/blog/c-sharp-get-web-config-connection-string-in-a-class-library/</guid><description>If you can, pass the connection string as a parameter to the class library. Second option is System.Configuration.ConfigurationManager</description><pubDate>Sun, 15 Sep 2019 19:26:00 GMT</pubDate><content:encoded>&lt;p&gt;This is relatively old topic but looks like still relevant. You need to know why?&lt;/p&gt;
&lt;h3 id=&quot;story&quot;&gt;Story&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#story&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Recently one of our vendor deployed an app in one of our environment and when tested, found that the some of the entries going to wrong DB. Checked the connection strings in Web.Config, everything was fine. Due to the lack of proper logging in the application, we planned to hook up &lt;strong&gt;Microsoft Azure Application Insights&lt;/strong&gt;, and we did discovered something, thanks to AI.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Application Map in the &lt;a href=&quot;https://x.com/hashtag/Azure?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Azure&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/applicationinsights?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#applicationinsights&lt;/a&gt; saved us. &lt;br&gt;&lt;br&gt;We were able to catch a wrong connection string hardcoded in a vendor dll by checking the Application Map in the AI.&lt;a href=&quot;https://x.com/AppInsights?ref_src=twsrc%5Etfw&quot;&gt;@AppInsights&lt;/a&gt; 👏 👏 👏&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1172902535331495936?ref_src=twsrc%5Etfw&quot;&gt;September 14, 2019&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;Hard coding something like Connection String is a &lt;strong&gt;BAD PRACTICE&lt;/strong&gt;, things like that &lt;strong&gt;should come as a parameter to the class library methods&lt;/strong&gt;. Since we are not in a position to rewrite everything, what we did was, we replaced the hard coded connection string with the actual connection string value from the web.config.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConnectionString&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConfigurationManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConnectionStrings&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Default&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConnectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using  System.Configuration;...public static string ConnectionString{  get { return ConfigurationManager.ConnectionStrings[&amp;quot;Default&amp;quot;].ConnectionString; }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above code, &lt;code&gt;Default&lt;/code&gt; is the connection string name in the &lt;strong&gt;web.config&lt;/strong&gt;.&lt;/p&gt;</content:encoded><category>aspnet</category><category>c-sharp</category><category>web-config</category><author>Abhith Rajan</author></item><item><title>Using AutoMapper in a .NET Core Class Library</title><link>https://www.abhith.net/blog/using-automapper-in-a-net-core-class-library/</link><guid isPermaLink="true">https://www.abhith.net/blog/using-automapper-in-a-net-core-class-library/</guid><description>Configuring and using AutoMapper in a .NET CORE class library is briefed in this article.</description><pubDate>Wed, 11 Sep 2019 12:59:27 GMT</pubDate><content:encoded>&lt;p&gt;AutoMapper is a handy helper library to do mapping between objects. In most scenarios, you might have an Entity Class and you want to map it to some DTO class or vice versa. With minimal configuration, &lt;strong&gt;AutoMapper&lt;/strong&gt; can do this mapping without you creating a method where you map each field one by one.&lt;/p&gt;
&lt;p&gt;Suppose I have to map &lt;em&gt;Entity&lt;/em&gt; class to &lt;em&gt;EntityDto&lt;/em&gt; and they look like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Entity&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Guid&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;CurrencyCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;decimal&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;CurrencyValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;EntityDto&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Guid&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Currency&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Currency&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Currency&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Code&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public class Entity{  public string Name {get;set;}  public Guid Id {get;set;}  public string CurrencyCode {get;set;}  public decimal CurrencyValue {get;set;}}public class EntityDto{  public string Name {get;set;}  public Guid Id {get;set;}  public Currency Currency {get;set;}}public class Currency{  public string Code {get;set;}  public string Value {get;set;}}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;AutoMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeService&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ISomeService&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IMapper&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;_iMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;SomeService&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// One time configuration&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;config&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;MapperConfiguration&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;cfg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;cfg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Entity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;EntityDto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;().&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ForMember&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Currency&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;MapFrom&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Currency&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Code&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CurrencyCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CurrencyValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;0.00&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_iMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;config&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DtoClass&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Guid&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Entity&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;entity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetEntityByIdAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// using auto mapper to do the mapping&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_iMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DtoClass&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;entity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using AutoMapper;...public class SomeService : ISomeService{  private IMapper _iMapper;  public SomeService()  {    // One time configuration      var config = new MapperConfiguration(cfg =&gt;      {          cfg.CreateMap&lt;Entity, EntityDto&gt;().ForMember(dto =&gt; dto.Currency, map =&gt; map.MapFrom(source =&gt; new Currency          {              Code = source.CurrencyCode,              Value = source.CurrencyValue.ToString(&amp;quot;0.00&amp;quot;)          }));      });      _iMapper = config.CreateMapper();  }...}public async Task&lt;DtoClass&gt; GetAsync(Guid id){    Entity entity = await GetEntityByIdAsync(id);    // using auto mapper to do the mapping    var dto = _iMapper.Map&lt;DtoClass&gt;(entity);    return dto;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the mapping configuration, we didn’t specify anything related &lt;em&gt;Id, Name&lt;/em&gt; properties. &lt;strong&gt;AutoMapper&lt;/strong&gt; will map them automatically since the source and destination property name matches for those.&lt;/p&gt;
&lt;p&gt;In the above, we defined the mappings in the same class, a better solution would be a common place where we define all the mappings. Let’s do that,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ObjectMapper&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;readonly&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Lazy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IMapper&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Lazy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Lazy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(() &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;config&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;MapperConfiguration&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;cfg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// This line ensures that internal properties are also mapped over.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;cfg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ShouldMapProperty&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;GetMethod&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;IsPublic&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;||&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;GetMethod&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;IsAssembly&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;cfg&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddProfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomDtoMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;mapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;config&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;mapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;IMapper&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;Mapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Lazy&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public static class ObjectMapper{    private static readonly Lazy&lt;IMapper&gt; Lazy = new Lazy&lt;IMapper&gt;(() =&gt;    {        var config = new MapperConfiguration(cfg =&gt;        {            // This line ensures that internal properties are also mapped over.            cfg.ShouldMapProperty = p =&gt; p.GetMethod.IsPublic || p.GetMethod.IsAssembly;            cfg.AddProfile&lt;CustomDtoMapper&gt;();        });        var mapper = config.CreateMapper();        return mapper;    });    public static IMapper Mapper =&gt; Lazy.Value;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;All the mapping configuration goes to,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;CustomDtoMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Profile&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CustomDtoMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;CreateMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Entity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;EntityDto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;().&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ForMember&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Currency&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;MapFrom&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Currency&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Code&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CurrencyCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;CurrencyValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;0.00&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// All other mappings goes here&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public class CustomDtoMapper : Profile{    public CustomDtoMapper()    {        CreateMap&lt;Entity, EntityDto&gt;().ForMember(dto =&gt; dto.Currency, map =&gt; map.MapFrom(source =&gt; new Currency          {              Code = source.CurrencyCode,              Value = source.CurrencyValue.ToString(&amp;quot;0.00&amp;quot;)          }));        // All other mappings goes here    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And use the &lt;strong&gt;ObjectMapper&lt;/strong&gt; where ever you wanted,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dto&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ObjectMapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Mapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Map&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;DtoClass&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;entity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var dto = ObjectMapper.Mapper.Map&lt;DtoClass&gt;(entity);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Read more about the &lt;a href=&quot;https://automapper.org/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=using-automapper-in-a-net-core-class-library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;AutoMapper&lt;/a&gt; configuration on the official website of &lt;a href=&quot;https://automapper.org/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=using-automapper-in-a-net-core-class-library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;AutoMapper&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/api/system.lazy-1?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=using-automapper-in-a-net-core-class-library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Lazy Class (System) | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2020-03-15&quot;&gt;2020-03-15&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-03-15&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added common configuration model (ObjectMapper).&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>c-sharp</category><category>dotnet-core</category><author>Abhith Rajan</author></item><item><title>Dapper - Execute Multiple Stored Procedures</title><link>https://www.abhith.net/blog/dapper-execute-multiple-stored-procedures/</link><guid isPermaLink="true">https://www.abhith.net/blog/dapper-execute-multiple-stored-procedures/</guid><description>Dapper provides extension methods to execute multiple queries within the same command. The same can be used to execute multiple stored procedures.</description><pubDate>Thu, 05 Sep 2019 12:59:27 GMT</pubDate><content:encoded>&lt;p&gt;Dapper is my preferred ORM for performance constraint applications. It is one of the best solution in case of a database first approach as well as when there is already a database in place. Dapper works with SQL Server as well as so many other DB’s and I have tried Oracle DB apart from SQL Server.&lt;/p&gt;
&lt;p&gt;Dapper have so many features/extension methods, the documentation of these features can be accessed here.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://dapper-tutorial.net/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dapper-execute-multiple-stored-procedures&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dapper Dapper Tutorial | Dapper Tutorial and Documentation &lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To execute multiple stored procedures or multiple &lt;strong&gt;SQL&lt;/strong&gt; statements, we can use the &lt;code&gt;QueryMultipleAsync&lt;/code&gt; extension method.
See the sample code below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Dapper&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SomeClass&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Guid&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Guid&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;anotherId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;connection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SqlConnection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;_settings&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ConnectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;connection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Open&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;sql&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;@&amp;quot;exec uspTableOneAction @someId;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;exec uspTableTwoAnotherAction @anotherId;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;multi&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;connection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;QueryMultipleAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;sql&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;anotherId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; }))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;firstTableItem&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;multi&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Read&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;TableOneItem&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;().&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;First&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;secondTableItem&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;multi&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Read&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;TableTwoItem&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;().&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FirstOrDefault&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Dapper;...public async Task&lt;SomeClass&gt; GetAsync(Guid someId, Guid anotherId){    using (var connection = new SqlConnection(_settings.ConnectionString()))    {        connection.Open();        const string sql = @&amp;quot;exec uspTableOneAction @someId;                             exec uspTableTwoAnotherAction @anotherId;&amp;quot;;        using (var multi = await connection.QueryMultipleAsync(sql, new { someId, anotherId }))        {            var firstTableItem = multi.Read&lt;TableOneItem&gt;().First();            var secondTableItem = multi.Read&lt;TableTwoItem&gt;().FirstOrDefault();           ...        }        ...    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above code, my stored procedure are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;uspTableOneAction&lt;/li&gt;
&lt;li&gt;uspTableTwoAnotherAction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The naming convention which we follows for stored procedures are,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8;--2:#54666c&quot;&gt;usp{TableName}{Action}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;usp{TableName}{Action}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;eg: uspUserInsert, uspUserUpdate&lt;/p&gt;
&lt;p&gt;And in the above example, first stored procedure expects a parameter &lt;code&gt;@someId&lt;/code&gt;.
And the second stored procedure expects &lt;code&gt;@anotherId&lt;/code&gt;. We passed these args by&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;anotherId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;new { someId, anotherId }&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The same can be written as,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;anotherId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;anotherId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;new { someId = someId, anotherId = anotherId }&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Why we omitted the right hand side part in the example is because of the arguments name matching the parameter.&lt;/p&gt;
&lt;p&gt;Just in case if both stored procedures expecting same parameter, say &lt;code&gt;@someId&lt;/code&gt;. Then our args will look like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;new { someId }&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That’s it. You have the result of the two queries.&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://dapper-tutorial.net/async?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dapper-execute-multiple-stored-procedures#querymultipleasync&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dapper Async | Dapper Tutorial and Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dapper-tutorial.net/querymultiple?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dapper-execute-multiple-stored-procedures&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dapper QueryMultiple | Dapper Tutorial and Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>dapper</category><category>sql-server</category><category>orm</category><author>Abhith Rajan</author></item><item><title>IIS - Disable CORS</title><link>https://www.abhith.net/blog/iis-disable-cors/</link><guid isPermaLink="true">https://www.abhith.net/blog/iis-disable-cors/</guid><description>Disable CORS for IIS 10 website by allowing all origins in two simple steps.</description><pubDate>Wed, 14 Aug 2019 16:54:00 GMT</pubDate><content:encoded>&lt;p&gt;For any reason you wish to disable CORS for any website hosted on IIS, one way you can do this by allowing all origins.
To do that,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make sure you installed &lt;a href=&quot;https://www.iis.net/downloads/microsoft/iis-cors-module?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=iis-disable-cors&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;IIS CORS Module&lt;/a&gt; on the server.&lt;/li&gt;
&lt;li&gt;Update the &lt;strong&gt;Web.Config&lt;/strong&gt; of the website to have the &lt;strong&gt;cors&lt;/strong&gt; section as given below,&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note: &lt;em&gt;code tested on IIS 10&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; encoding&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;cors&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;enabled&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;failUnlistedOrigins&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;origin&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;allowHeaders&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowAllRequestedHeaders&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;cors&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&gt;&lt;configuration&gt;    &lt;system.webServer&gt;        &lt;cors enabled=&amp;quot;true&amp;quot; failUnlistedOrigins=&amp;quot;true&amp;quot;&gt;          &lt;add origin=&amp;quot;*&amp;quot;&gt;            &lt;allowHeaders allowAllRequestedHeaders=&amp;quot;true&amp;quot; /&gt;          &lt;/add&gt;        &lt;/cors&gt;    &lt;/system.webServer&gt;&lt;/configuration&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;As you can see, we are allowing all origin’s by specifying &lt;code&gt;*&lt;/code&gt; as the origin.&lt;/p&gt;
&lt;p&gt;After just allowing all origins alone, if you encounter error like,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To solve that, we are setting &lt;code&gt;allowAllRequestedHeaders=&amp;quot;true&amp;quot;&lt;/code&gt; in the &lt;code&gt;allowHeaders&lt;/code&gt; for all the origins.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Remember: CORS is a security feature. Disable only if the resource is totally public.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/iis/extensions/cors-module/cors-module-configuration-reference?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=iis-disable-cors#cors-configuration&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CORS Module Configuration Reference | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>iis</category><category>web-config</category><author>Abhith Rajan</author></item><item><title>Azure Web App - Web Deploy to a Sub-folder</title><link>https://www.abhith.net/blog/azure-web-app-web-deploy-to-a-sub-folder/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-web-app-web-deploy-to-a-sub-folder/</guid><description>Follow this tutorial to configure web deploy from Visual Studio to a sub-folder in your azure web app (App Service).</description><pubDate>Tue, 30 Jul 2019 15:11:27 GMT</pubDate><content:encoded>&lt;p&gt;I always recommends Microsoft Azure. Recently, We needed to deploy an ASP.NET Core app to a sub-folder inside Azure Web App (App Service).&lt;/p&gt;
&lt;p&gt;By default Azure provides publish profiles for the Web App (To put files to the root of the domain). In our case, We wanted to deploy inside a sub-folder.&lt;/p&gt;
&lt;p&gt;Suppose our web app name was &lt;code&gt;demo-site&lt;/code&gt; and we want to web deploy the app under &lt;code&gt;demo-site\folder\sub-folder&lt;/code&gt;. To do that,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download the publish profile&lt;/li&gt;
&lt;li&gt;Import in Visual Studio&lt;/li&gt;
&lt;li&gt;Edit the web-deploy profile(Normally the publish profile will have Web Deploy as well as FTP profile)
&lt;ul&gt;
&lt;li&gt;Change Site Name from &lt;code&gt;demo-site&lt;/code&gt; to &lt;code&gt;demo-site\folder\sub-folder&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Change the Destination URL from &lt;code&gt;http://demo-site.azurewebsites.net&lt;/code&gt; to &lt;code&gt;http://demo-site.azurewebsites.net/folder/sub-folder&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Publish&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But the publish failed with error,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;System.TypeLoadException: Method ‘get_Settings’ in type ‘Microsoft.Web.LibraryManager.Build.HostInteraction’ from assembly ‘Microsoft.Web.LibraryManager.Build&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is specific to our application and may not have anything to do with your app, so can skip this part.&lt;/p&gt;
&lt;p&gt;After referring a similar issue posted in GitHub &lt;a href=&quot;https://github.com/aspnet/LibraryManager/issues/481?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-web-app-web-deploy-to-a-sub-folder&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnet/LibraryManager&lt;/a&gt;, We resolved the issue by updating &lt;strong&gt;Microsoft.Web.LibraryManager.Build&lt;/strong&gt; Nuget package in my project.&lt;/p&gt;
&lt;p&gt;Now next error,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Error - Web Deployment failed ERROR_NOT_SUPPORTED&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;More details about web deployment error can be found from &lt;a href=&quot;https://docs.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/web-deploy-error-codes?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-web-app-web-deploy-to-a-sub-folder#ERROR_NOT_SUPPORTED&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. In order to solve that,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Go to portal &amp;gt; demo-site App Service &amp;gt; Configuration &amp;gt; Path Mappings &amp;gt; Virtual applications and directories. And add the following,&lt;/p&gt;
&lt;/blockquote&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Virtual path&lt;/th&gt;&lt;th&gt;Physical Path&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;/folder&lt;/td&gt;&lt;td&gt;site\wwwroot\folder&lt;/td&gt;&lt;td&gt;Folder&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;/folder/sub-folder&lt;/td&gt;&lt;td&gt;site\wwwroot\folder\sub-folder&lt;/td&gt;&lt;td&gt;Application&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Now publish from Visual Studio. If you only need to publish to a first level folder, i.e to &lt;code&gt;demo-site\folder&lt;/code&gt;, then all you have to do is, change the &lt;strong&gt;Type&lt;/strong&gt; to &lt;code&gt;Application&lt;/code&gt; in the Path mappings for &lt;code&gt;/folder&lt;/code&gt;, and skip the sub-folder entry since you don’t need it. And correct the &lt;strong&gt;Site Name&lt;/strong&gt; and &lt;strong&gt;Destination URL&lt;/strong&gt; in the publish profile accordingly.&lt;/p&gt;</content:encoded><category>azure</category><author>Abhith Rajan</author></item><item><title>Azure Web App - Missing MIME types</title><link>https://www.abhith.net/blog/azure-web-app-missing-mime-types/</link><guid isPermaLink="true">https://www.abhith.net/blog/azure-web-app-missing-mime-types/</guid><description>If you are seeing &quot;404 Not Found&quot; for .woff, .woff2 or for .json files even if they exist on your azure web app, this is the post for you.</description><pubDate>Thu, 11 Jul 2019 12:59:27 GMT</pubDate><content:encoded>&lt;p&gt;When you deploy an app to &lt;strong&gt;Azure app service&lt;/strong&gt; (Web App), you may notice that the custom font isn’t showing up or some specific files is getting 404 even if they exist on the right place.&lt;/p&gt;
&lt;p&gt;This is because of the missing Mime type definitions.&lt;/p&gt;
&lt;h2 id=&quot;mime-types&quot;&gt;Mime Types&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#mime-types&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Its definition is,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A media type (also known as a Multipurpose Internet Mail Extensions or MIME type) is a standard that indicates the nature and format of a document, file, or assortment of bytes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And if you want to know why it is causing the 404, read &lt;a href=&quot;https://docs.plesk.com/en-US/onyx/administrator-guide/65216/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=azure-web-app-missing-mime-types&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; article.&lt;/p&gt;
&lt;h2 id=&quot;missing-mime-types&quot;&gt;Missing Mime Types&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#missing-mime-types&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;font-files&quot;&gt;Font Files&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#font-files&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/font-woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;woff2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/font-woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;mimeMap fileExtension=&amp;quot;woff&amp;quot; mimeType=&amp;quot;application/font-woff&amp;quot; /&gt;  &lt;mimeMap fileExtension=&amp;quot;woff2&amp;quot; mimeType=&amp;quot;application/font-woff&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;json&quot;&gt;Json&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#json&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;mimeMap fileExtension=&amp;quot;.json&amp;quot; mimeType=&amp;quot;application/json&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;svg&quot;&gt;SVG&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#svg&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.svg&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.svg&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;image/svg+xml&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;remove fileExtension=&amp;quot;.svg&amp;quot;/&gt;  &lt;mimeMap fileExtension=&amp;quot;.svg&amp;quot; mimeType=&amp;quot;image/svg+xml&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;more&quot;&gt;More&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#more&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.webmanifest&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/manifest+json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.webp&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;image/webp&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!-- Not all browser supports webp /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;mimeMap fileExtension=&amp;quot;.webmanifest&amp;quot; mimeType=&amp;quot;application/manifest+json&amp;quot; /&gt;  &lt;mimeMap fileExtension=&amp;quot;.webp&amp;quot; mimeType=&amp;quot;image/webp&amp;quot; /&gt; &lt;!-- Not all browser supports webp /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;sample-webconfig-file&quot;&gt;Sample web.config file&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#sample-webconfig-file&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; encoding&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;staticContent&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/font-woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;woff2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;woff2&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/font-woff&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.svg&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mimeMap&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;fileExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.svg&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;mimeType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;image/svg+xml&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;staticContent&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&gt;&lt;configuration&gt;    &lt;system.webServer&gt;        &lt;staticContent&gt;            &lt;remove fileExtension=&amp;quot;woff&amp;quot;/&gt;            &lt;mimeMap fileExtension=&amp;quot;woff&amp;quot; mimeType=&amp;quot;application/font-woff&amp;quot; /&gt;            &lt;remove fileExtension=&amp;quot;woff2&amp;quot;/&gt;            &lt;mimeMap fileExtension=&amp;quot;woff2&amp;quot; mimeType=&amp;quot;application/font-woff&amp;quot; /&gt;            &lt;remove fileExtension=&amp;quot;.json&amp;quot;/&gt;            &lt;mimeMap fileExtension=&amp;quot;.json&amp;quot; mimeType=&amp;quot;application/json&amp;quot; /&gt;            &lt;remove fileExtension=&amp;quot;.svg&amp;quot;/&gt;            &lt;mimeMap fileExtension=&amp;quot;.svg&amp;quot; mimeType=&amp;quot;image/svg+xml&amp;quot; /&gt;         &lt;/staticContent&gt;    &lt;/system.webServer&gt;&lt;/configuration&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Curious about &lt;code&gt;remove fileExtension&lt;/code&gt; ?
MimeMap collection inherits but it won’t allow duplicate entries. If a duplicate mimeMap definition is added, it will result,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;IIS7 Error: cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So for the safe side, we are removing the global definition for that extension before changing it.&lt;/p&gt;</content:encoded><category>azure</category><category>web-config</category><author>Abhith Rajan</author></item><item><title>Best Laptop for Programming Under $2500 Dollars 2019</title><link>https://www.abhith.net/blog/best-laptop-for-programming/</link><guid isPermaLink="true">https://www.abhith.net/blog/best-laptop-for-programming/</guid><description>Best laptop under 2500$ in 2019 with min spec of i7-9750H, RTX-2060 and Thunderbolt 3 support.</description><pubDate>Sat, 08 Jun 2019 22:50:00 GMT</pubDate><content:encoded>&lt;p&gt;For the past month, I have been in the search for the best laptop, that will help me to do things faster. &lt;strong&gt;Best in the sense which worth every penny and yet strong in specs&lt;/strong&gt;, not a high-end gaming machine.&lt;/p&gt;
&lt;h3 id=&quot;history&quot;&gt;History&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#history&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Laptops I used earlier are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dell Inspiron (Exact series don’t remember)&lt;/li&gt;
&lt;li&gt;HP Pro Book&lt;/li&gt;
&lt;li&gt;Lenovo Y520 (256 SSD)&lt;/li&gt;
&lt;li&gt;Lenovo G40&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the above list, none of them owned by myself, first 3 out of the 4 was given by my ex-company during the employment period and the other is rented out from my brother-in-law. Out of all Lenovo Y520 was my favorite just because of its specs and speed.&lt;/p&gt;
&lt;h3 id=&quot;minimum-requirements&quot;&gt;Minimum Requirements&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#minimum-requirements&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Right now its time to own a machine, and the &lt;strong&gt;minimum&lt;/strong&gt; features am looking for are,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Thunderbolt 3 support.&lt;/li&gt;
&lt;li&gt;SSD&lt;/li&gt;
&lt;li&gt;Intel i7-9750H processor&lt;/li&gt;
&lt;li&gt;RTX 2060 Graphics card&lt;/li&gt;
&lt;li&gt;Fingerprint sensor&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;shortlisted-laptops&quot;&gt;Shortlisted Laptops&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#shortlisted-laptops&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The main YouTube channels which I rely for laptop reviews are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/channel/UCVYamHliCI9rw1tHR1xbkfw?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dave Lee (Dave 2D)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/channel/UCkTweJExGMqp3NLvzvOn-yg?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;OWNorDisown&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/channel/UCVlMUh4WsDQvOxCJJXmWwdw?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Matthew Moniz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/channel/UC2Rzju32yQPkQ7oIhmeuLwg?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Jarrod’sTech&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/user/satanjamez?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Bob Of All Trades&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And After watching tons of reviews and all, my shortlisted items are,&lt;/p&gt;
&lt;h4 id=&quot;aero-15&quot;&gt;AERO 15&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#aero-15&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Model Name: WA-7US5130SP
&lt;a href=&quot;https://store.gigabyte.us/aero-15-oled-wa-7us5130sp-uhd-amoled-i7-9750h-nvidia-geforce-rtx-2060-gddr6-6gb-16gb-ram-512gb-m-2-pcie-ssd-win-10-pro-gaming-laptop/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Official Website&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On the pro side, it ticks all my requirement 5/5.&lt;/p&gt;
&lt;h5 id=&quot;cons&quot;&gt;Cons&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cons&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Web Camera position&lt;/li&gt;
&lt;li&gt;Thermal throttling&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;youtube: https://www.youtube.com/watch?v=W64J7_Md1I4&lt;/code&gt;&lt;/p&gt;
&lt;h5 id=&quot;purchase-aero-15&quot;&gt;Purchase AERO 15&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#purchase-aero-15&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;&lt;a href=&quot;https://amzn.to/2Xj05jQ?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Amazon&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;thinkpad-x1-extreme-2nd-gen-156-laptop&quot;&gt;ThinkPad X1 Extreme (2nd Gen) (15.6”) Laptop&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#thinkpad-x1-extreme-2nd-gen-156-laptop&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://www.lenovo.com/us/en/laptops/thinkpad/thinkpad-x/X1-Extreme-Gen-2/p/22TP2TXX1E2?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Official Website&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;acer-predator-triton-500&quot;&gt;Acer Predator Triton 500&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#acer-predator-triton-500&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Model Name: PT515-51-73EG
&lt;a href=&quot;https://www.acer.com/ac/en/US/content/predator-model/NH.Q50AA.003?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Official Website&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Watch the reviews,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;youtube: https://www.youtube.com/watch?v=pXkE0BlTBmI&lt;/code&gt;
&lt;code&gt;youtube: https://www.youtube.com/watch?v=rOCiNSZIhmM&lt;/code&gt;
&lt;code&gt;youtube: https://www.youtube.com/watch?v=qwGTHLeG2dY&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;On the pro side, it matches my requirement 4/5. But on the con side, it is not easily upgradable because of its inverted motherboard construction. See the below video,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;youtube: https://www.youtube.com/watch?v=6-PmEaytJOA&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Other than that, Only zoned RGB keyboard, &lt;strong&gt;NO&lt;/strong&gt; per key RGB.&lt;/p&gt;
&lt;p&gt;Couldn’t find the exact one in &lt;a href=&quot;https://amzn.to/2KrpHcz?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Amazon&lt;/a&gt; but similar spec with intel 8750H found &lt;a href=&quot;https://amzn.to/2KrpHcz?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&quot;hp-omen-15-latest&quot;&gt;HP Omen 15 (Latest)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#hp-omen-15-latest&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Check out the below review.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;youtube: https://www.youtube.com/watch?v=EloUckKqAKc&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Its the cheapest in this list. And it got a bit more gaming look.&lt;/p&gt;
&lt;h4 id=&quot;any-refurbished-workstation&quot;&gt;Any Refurbished WORKSTATION&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#any-refurbished-workstation&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To save some bucks.&lt;/p&gt;
&lt;h3 id=&quot;skipped-laptops&quot;&gt;Skipped Laptops&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#skipped-laptops&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Acer Helios 300 (2019)&lt;/strong&gt; - Lack of thunderbolt support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lenovo Y740&lt;/strong&gt; - Big Charger and small battery.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asus ROG Zephyrus S GX701&lt;/strong&gt; - Lack of thunderbolt support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ASUS ROG Zephyrus S GX502GW&lt;/strong&gt; - Lack of thunderbolt support.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2019-laptop-awards&quot;&gt;2019 Laptop Awards&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2019-laptop-awards&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;youtube: https://www.youtube.com/watch?v=O8zcB_EcAyY&lt;/code&gt;
&lt;code&gt;youtube: https://www.youtube.com/watch?v=icRz80kKZBA&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;And my search ended when I found a good deal on &lt;a href=&quot;https://www.newegg.com/global/ae-en/p/N82E16834844793?Item=N82E16834844793&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-laptop-for-programming&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dell Precision 7720&lt;/a&gt;. Even though it only ticked 2 out of my 5 requirements, am pretty satisfied with it.&lt;/p&gt;</content:encoded><category>awesome-list</category><category>laptops</category><category>shopping-guide</category><author>Abhith Rajan</author></item><item><title>Create SQL Server Database From a Script in Docker-Compose</title><link>https://www.abhith.net/blog/create-sql-server-database-from-a-script-in-docker-compose/</link><guid isPermaLink="true">https://www.abhith.net/blog/create-sql-server-database-from-a-script-in-docker-compose/</guid><description>Run a SQL Server container with database initialized from a script using docker-compose.</description><pubDate>Tue, 21 May 2019 14:55:00 GMT</pubDate><content:encoded>&lt;p&gt;In one of our project which using &lt;strong&gt;Microsoft Orleans&lt;/strong&gt;, We used ADO.NET clustering with &lt;strong&gt;SQL Server&lt;/strong&gt;. When we tried to containerize the application suite, we need a SQL Server instance in a container (for development environment) with a &lt;strong&gt;database initialized&lt;/strong&gt; with some tables and all.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: The below setup is not recommended for a &lt;strong&gt;PRODUCTION&lt;/strong&gt; environment.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For that solution, our &lt;strong&gt;docker-compose.yml&lt;/strong&gt; looks like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;3.4&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;other.service&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;environment&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ConnectionString=Data Source=CONTAINER_NAME_OF_db;Initial Catalog=DB_NAME;User Id=sa;Password=Your_password123;Pooling=False;Max Pool Size=200;MultipleActiveResultSets=True&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;depends_on&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;db&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;db&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;image&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;my/db/image/name&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dockerfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;data/Dockerfile&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# ports:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;#   - &amp;quot;1444:1433&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;volumes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;mssqldata:/var/opt/mssql&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;volumes&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;mssqldata&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;version: &apos;3.4&apos;services:  other.service:    ...    environment:      - ConnectionString=Data Source=CONTAINER_NAME_OF_db;Initial Catalog=DB_NAME;User Id=sa;Password=Your_password123;Pooling=False;Max Pool Size=200;MultipleActiveResultSets=True    depends_on:      - db  db:    image: my/db/image/name    build:      context: .      dockerfile: data/Dockerfile    # ports:    #   - &amp;quot;1444:1433&amp;quot;    volumes:     - mssqldata:/var/opt/mssqlvolumes:  mssqldata:&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above, the &lt;strong&gt;other.service&lt;/strong&gt; can be anything (WEB App/Console App etc) that requires the sql server db instance. We marked the dependency between these services properly using &lt;a href=&quot;https://docs.docker.com/compose/compose-file/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=create-sql-server-database-from-a-script-in-docker-compose#depends_on&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;depends_on&lt;/a&gt; in the &lt;strong&gt;docker-compose.yml&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;volumes&lt;/strong&gt; is specified in the &lt;strong&gt;docker-compose.yml&lt;/strong&gt; in-order to &lt;a href=&quot;https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-docker?view=sql-server-2017&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=create-sql-server-database-from-a-script-in-docker-compose#persist&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;persist&lt;/a&gt; the SQL Server data.&lt;/p&gt;
&lt;p&gt;In the same directory where &lt;strong&gt;docker-compose.yml&lt;/strong&gt; is, there is a &lt;strong&gt;data&lt;/strong&gt; folder which contains following,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dockerfile&lt;/li&gt;
&lt;li&gt;entrypoint.sh&lt;/li&gt;
&lt;li&gt;setup.sql&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Dockerfile&lt;/strong&gt; Which basically get the latest image of &lt;code&gt;mcr.microsoft.com/mssql/server&lt;/code&gt; (linux) and configures the SQL Server container.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;FROM mcr.microsoft.com/mssql/server&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ENV ACCEPT_EULA=Y&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ENV SA_PASSWORD=Your_password123&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;COPY ./data /&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ENTRYPOINT [ &amp;quot;/bin/bash&amp;quot;, &amp;quot;entrypoint.sh&amp;quot; ]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;CMD [ &amp;quot;/opt/mssql/bin/sqlservr&amp;quot; ]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;FROM mcr.microsoft.com/mssql/serverENV ACCEPT_EULA=YENV SA_PASSWORD=Your_password123COPY ./data /ENTRYPOINT [ &amp;quot;/bin/bash&amp;quot;, &amp;quot;entrypoint.sh&amp;quot; ]CMD [ &amp;quot;/opt/mssql/bin/sqlservr&amp;quot; ]&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Entry point in the &lt;strong&gt;Dockerfile&lt;/strong&gt; is pointed to a custom shell &lt;code&gt;entrypoint.sh&lt;/code&gt; which is,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-e&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--2:#1D6F69&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;/opt/mssql/bin/sqlservr&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; ]; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;then&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# If this is the container&amp;#39;s first run, initialize the application database&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;-f&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; /tmp/app-initialized ]; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;then&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Initialize the application database asynchronously in a background process. This allows a) the SQL Server process to be the main process in the container, which allows graceful shutdown and other goodies, and b) us to only start the SQL Server process once, as opposed to starting, stopping, then starting it again.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;initialize_app_database&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Wait a bit for SQL Server to start. SQL Server&amp;#39;s process doesn&amp;#39;t provide a clever way to check if it&amp;#39;s up or not, and it needs to be up before we can import the application database&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;sleep&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;15s&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;#run the setup script to create the DB and the schema in the DB&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;/opt/mssql-tools/bin/sqlcmd&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-S&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;localhost&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-U&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;sa&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-P&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Your_password123&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-d&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;master&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-i&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;setup.sql&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;# Note that the container has been initialized so future starts won&amp;#39;t wipe changes to the data&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;touch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;/tmp/app-initialized&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;initialize_app_database&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;exec&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--2:#1D6F69&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;#!/bin/bashset -eif [ &amp;quot;$1&amp;quot; = &apos;/opt/mssql/bin/sqlservr&apos; ]; then  # If this is the container&apos;s first run, initialize the application database  if [ ! -f /tmp/app-initialized ]; then    # Initialize the application database asynchronously in a background process. This allows a) the SQL Server process to be the main process in the container, which allows graceful shutdown and other goodies, and b) us to only start the SQL Server process once, as opposed to starting, stopping, then starting it again.    function initialize_app_database() {      # Wait a bit for SQL Server to start. SQL Server&apos;s process doesn&apos;t provide a clever way to check if it&apos;s up or not, and it needs to be up before we can import the application database      sleep 15s      #run the setup script to create the DB and the schema in the DB      /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Your_password123 -d master -i setup.sql      # Note that the container has been initialized so future starts won&apos;t wipe changes to the data      touch /tmp/app-initialized    }    initialize_app_database &amp;amp;  fifiexec &amp;quot;$@&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And the &lt;strong&gt;setup.sql&lt;/strong&gt; contains all the SQL statements to generate the DB and all. An example given below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;DATABASE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;DB_NAME&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; DB_NAME;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;CREATE DATABASE DB_NAME;GOUSE DB_NAME;...&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>docker</category><category>sql-server</category><author>Abhith Rajan</author></item><item><title>Microsoft SQL Server Guy Trying Oracle Database</title><link>https://www.abhith.net/blog/microsoft-sql-server-guy-trying-oracle-databse/</link><guid isPermaLink="true">https://www.abhith.net/blog/microsoft-sql-server-guy-trying-oracle-databse/</guid><description>This post contains my personal experiences trying Oracle Database.</description><pubDate>Wed, 08 May 2019 15:11:27 GMT</pubDate><content:encoded>&lt;p&gt;I have worked with &lt;strong&gt;Microsoft SQL Server&lt;/strong&gt; for the past 7 years and still enjoying working with &lt;strong&gt;SQL Server&lt;/strong&gt;. Now I got a chance to explore &lt;strong&gt;Oracle Database&lt;/strong&gt; and here is my experience.&lt;/p&gt;
&lt;h2 id=&quot;noticed-differences&quot;&gt;Noticed Differences&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#noticed-differences&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;There is &lt;strong&gt;NO DATABASE NAME&lt;/strong&gt;, instead there is this &lt;code&gt;user&lt;/code&gt; or &lt;code&gt;schema&lt;/code&gt; wise separation.&lt;/li&gt;
&lt;li&gt;Preferred IDE is &lt;strong&gt;Oracle SQL Developer&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;After executing query, you need to &lt;strong&gt;commit&lt;/strong&gt; in order to retain the changes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SELECT TOP N&lt;/code&gt; is not that easy compared to SQL Server.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;docs&quot;&gt;Docs&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#docs&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;tablespaces&quot;&gt;Tablespaces&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#tablespaces&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;An Oracle database consists of one or more logical storage units called tablespaces, which collectively store all of the database’s data.&lt;/p&gt;
&lt;h3 id=&quot;varchar-vs-varchar2&quot;&gt;VARCHAR vs VARCHAR2&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#varchar-vs-varchar2&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;VARCHAR&lt;/code&gt; is reserved by Oracle to support distinction between &lt;code&gt;NULL&lt;/code&gt; and &lt;code&gt;empty string&lt;/code&gt; in future, as ANSI standard prescribes.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;VARCHAR2&lt;/code&gt; does not distinguish between a NULL and empty string, and never will.&lt;/p&gt;
&lt;p&gt;If you rely on empty string and NULL being the same thing, you should use VARCHAR2.&lt;/p&gt;
&lt;h2 id=&quot;problems&quot;&gt;Problems&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#problems&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;show-line-numbers-in-oracle-sql-developer&quot;&gt;Show Line Numbers in Oracle SQL Developer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#show-line-numbers-in-oracle-sql-developer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This can be done easily by right clicking the line number section in the IDE, then &lt;code&gt;Toggle Line Numbers&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;create-user&quot;&gt;Create User&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#create-user&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; USER &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;UserName&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; IDENTIFIED &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;lt;Password&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;GRANT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CONNECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; , &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;RESOURCE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, DBA &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;TO&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;UserName&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;CREATE USER &lt;UserName&gt; IDENTIFIED BY &lt;Password&gt;;GRANT CONNECT , RESOURCE, DBA TO &lt;UserName&gt;;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;varchar-to-blob&quot;&gt;VARCHAR to BLOB&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#varchar-to-blob&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We can use the inbuilt function &lt;code&gt;utl_raw.cast_to_raw&lt;/code&gt; which transforms a &lt;code&gt;varchar2&lt;/code&gt; into a &lt;code&gt;BLOB&lt;/code&gt; value,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;utl_raw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;cast_to_raw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;SOME_STRING&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;utl_raw.cast_to_raw(&apos;SOME_STRING&apos;)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;update-blob-via-query&quot;&gt;Update BLOB via Query&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#update-blob-via-query&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;Update&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; TABLE_NAME &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; COL_NAME &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;utl_raw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;cast_to_raw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;SOME_STRING&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Update TABLE_NAME SET COL_NAME = utl_raw.cast_to_raw(&apos;SOME_STRING&apos;);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;oracle-localhost-connection-string-for-an-aspnet-core--dapper-project&quot;&gt;Oracle localhost connection string for an ASP.NET CORE &amp;amp; Dapper project&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#oracle-localhost-connection-string-for-an-aspnet-core--dapper-project&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;readonly&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;ConnectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;@&amp;quot;Data Source = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = XE))); user id = YOUR_USER_ID; Password= YOUR_USER_PASSWORD&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;dbConn&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OracleConnection&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConnectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;private readonly string ConnectionString = @&amp;quot;Data Source = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = XE))); user id = YOUR_USER_ID; Password= YOUR_USER_PASSWORD&amp;quot;;using (var dbConn = new OracleConnection(ConnectionString)){  ...}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace &lt;strong&gt;YOUR_USER_ID&lt;/strong&gt; and &lt;strong&gt;YOUR_USER_PASSWORD&lt;/strong&gt; with appropriate values.&lt;/p&gt;
&lt;h3 id=&quot;ora-00933-sql-command-not-properly-ended&quot;&gt;ORA-00933: SQL command not properly ended&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#ora-00933-sql-command-not-properly-ended&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This is happened when my query contained &lt;strong&gt;semicolon&lt;/strong&gt; ”;” at the end. Removing the semicolon ”;” from the end of the query solved the problem.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I just started exploring &lt;strong&gt;Oracle Database&lt;/strong&gt;, so this post can be considered as a draft for now, more coming.&lt;/p&gt;</content:encoded><category>sql-server</category><category>oracle-database</category><category>cookbook</category><author>Abhith Rajan</author></item><item><title>Docker - SQL Error on ASP.NET Core Alpine</title><link>https://www.abhith.net/blog/docker-sql-error-on-aspnet-core-alpine/</link><guid isPermaLink="true">https://www.abhith.net/blog/docker-sql-error-on-aspnet-core-alpine/</guid><description>Having trouble to connect to a remote SQL server from an ASP.NET Core app running on top of Alpine dotnet on a linux container?</description><pubDate>Tue, 07 May 2019 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;My ASP.NET Core app was running fine on &lt;code&gt;mcr.microsoft.com/dotnet/core/runtime:2.2-stretch-slim&lt;/code&gt; on my linux container. And the build image size was 195MB. In order to reduce the file size, I switched to &lt;code&gt;mcr.microsoft.com/dotnet/core/sdk:2.2.203-alpine3.9&lt;/code&gt; and the new image size was 98.6MB. &lt;strong&gt;WOW !!!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But then there came this problem,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;System.InvalidOperationException: Internal connection fatal error&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The SQL client was having trouble in this build. After the regular research, find out that in the &lt;strong&gt;alpine&lt;/strong&gt; image&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;microsoft/dotnet&lt;/code&gt; Alpine images are purposefully configured to use the &lt;strong&gt;.NET Core 2.0 Globalization Invariant Mode&lt;/strong&gt;. This is done to reduce the size of the image substantially. It seems as though the SqlClient does not support running with the Globalization Invariant Mode.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you are thinking what is &lt;strong&gt;.NET Core 2.0 Globalization Invariant Mode&lt;/strong&gt;,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;.NET Core 2.0 Globalization Invariant Mode enables you to remove application dependencies on globalization data and globalization behavior. This mode is an opt-in feature that provides more flexibility if you care more about reducing dependencies and the size of distribution than globalization functionality or globalization-correctness.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But there is a small catch,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The drawback of running in the invariant mode is applications will get poor globalization support.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So solution for this was to add the following in Dockerfile just before the &lt;strong&gt;ENTRYPOINT&lt;/strong&gt;,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;RUN apk add --no-cache icu-libs&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;RUN apk add --no-cache icu-libsENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the first step, we are adding the &lt;code&gt;icu-libs&lt;/code&gt; &lt;a href=&quot;https://pkgs.alpinelinux.org/package/edge/main/x86/icu-libs?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=docker-sql-error-on-aspnet-core-alpine&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Alpine linux package&lt;/a&gt;, which is the international components for unicode library (libraries) and in the next step, we are setting &lt;strong&gt;DOTNET_SYSTEM_GLOBALIZATION_INVARIANT&lt;/strong&gt; to &lt;code&gt;false&lt;/code&gt; to enable the globalization support.&lt;/p&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/dotnet/corefx/blob/master/Documentation/architecture/globalization-invariant-mode.md?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=docker-sql-error-on-aspnet-core-alpine&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;.NET Core 2.0 Globalization Invariant Mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>aspnet-core</category><category>docker</category><category>sql-server</category><author>Abhith Rajan</author></item><item><title>Gatsby - Cookbook</title><link>https://www.abhith.net/blog/gatsby-cookbook/</link><guid isPermaLink="true">https://www.abhith.net/blog/gatsby-cookbook/</guid><description>This cookbook contains recipes that demonstrate how to solve common problems while working with Gatsby.</description><pubDate>Fri, 26 Apr 2019 20:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I 💟 Gatsby. This article contains some recipes which will be useful if you are into Gatsby for your next static site. Recipes are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#using-google-fonts-in-gatsby&quot;&gt;Using Google fonts in Gatsby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#using-icons-like-font-awesome-in-gatsby&quot;&gt;Using icons like Font Awesome in Gatsby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#disqus-integration-in-a-gatsby-website&quot;&gt;Disqus integration in a Gatsby website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;using-google-fonts-in-gatsby&quot;&gt;Using Google fonts in Gatsby&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#using-google-fonts-in-gatsby&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Import the font css on your site main css file.&lt;/p&gt;
&lt;p&gt;Using &lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-plugin-prefetch-google-fonts/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=gatsby-cookbook&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;gatsby-plugin-prefetch-google-fonts&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install the plugin &lt;code&gt;gatsby-plugin-prefetch-google-fonts&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;yarn&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;gatsby-plugin-prefetch-google-fonts&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;yarn add gatsby-plugin-prefetch-google-fonts&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Modify &lt;code&gt;gatsby-config.js&lt;/code&gt;. Inside the plugins array, add&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;resolve&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`gatsby-plugin-prefetch-google-fonts`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#54666C&quot;&gt;fonts&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: [&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;family: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`Oswald`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;subsets: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`latin`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;family: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`Open Sans`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;variants: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`400`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`700`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{  resolve: `gatsby-plugin-prefetch-google-fonts`,  options: {    fonts: [      {        family: `Oswald`,        subsets: [`latin`],      },      {        family: `Open Sans`,        variants: [`400`, `700`]      },    ],  },}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;You can change the font family and variants or number of fonts in the above configuration according to your website needs.&lt;/p&gt;
&lt;h4 id=&quot;using-icons-like-font-awesome-in-gatsby&quot;&gt;Using icons like Font Awesome in Gatsby&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#using-icons-like-font-awesome-in-gatsby&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Using &lt;a href=&quot;https://github.com/react-icons/react-icons?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=gatsby-cookbook&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;react-icons&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Add it to your packages.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;install&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;react-icons&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--save&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;npm install react-icons --save&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And in your react component&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;jsx&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;FaBeer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;react-icons/fa&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Question&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;React&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#595DA1&quot;&gt;Component&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;render&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h3&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Lets go for a &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;FaBeer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h3&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;import { FaBeer } from &amp;quot;react-icons/fa&amp;quot;;class Question extends React.Component {  render() {    return (      &lt;h3&gt;        {&amp;quot; &amp;quot;}        Lets go for a &lt;FaBeer /&gt;?{&amp;quot; &amp;quot;}      &lt;/h3&gt;    );  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;disqus-integration-in-a-gatsby-website&quot;&gt;Disqus integration in a Gatsby website&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#disqus-integration-in-a-gatsby-website&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Since &lt;strong&gt;Gatsby&lt;/strong&gt; is built on top of &lt;strong&gt;React&lt;/strong&gt;, we can use the React package for &lt;strong&gt;Disqus&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;yarn&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;disqus-react&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;yarn add disqus-react&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And in your post component&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DiscussionEmbed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; } &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;disqus-react&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;import { DiscussionEmbed } from &amp;quot;disqus-react&amp;quot;;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Define the &lt;strong&gt;Disqus&lt;/strong&gt; configuration like&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;disqusConfig&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;shortname: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;`yourDisqusShortName`&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;config: { identifier: &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;slug&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; },&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;const disqusConfig = {  shortname: `yourDisqusShortName`,  config: { identifier: slug, title },};&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Here &lt;code&gt;identifier&lt;/code&gt; is the unique id for your post, it can be anything.&lt;/p&gt;
&lt;p&gt;And now you can render the Disqus section by adding&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;jsx&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;DiscussionEmbed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;disqusConfig&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#BD2B28&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;DiscussionEmbed {...disqusConfig} /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;More recipes will be added as I explore &lt;strong&gt;Gatsby&lt;/strong&gt;.&lt;/p&gt;</content:encoded><category>gatsby</category><category>cookbook</category><category>react</category><author>Abhith Rajan</author></item><item><title>ASP.NET Core - Handling Custom Header on Request/Response</title><link>https://www.abhith.net/blog/asp-net-core-handling-custom-header-on-request-response/</link><guid isPermaLink="true">https://www.abhith.net/blog/asp-net-core-handling-custom-header-on-request-response/</guid><description>There may be situations where you want to add a custom header in your ASP.NET Core API response or you need to read a header from the request.</description><pubDate>Thu, 25 Apr 2019 12:11:27 GMT</pubDate><content:encoded>&lt;p&gt;You can access the request headers or modify the response headers easily inside the controller in your &lt;strong&gt;ASP.NET Core&lt;/strong&gt; applications.&lt;/p&gt;
&lt;h2 id=&quot;add-custom-header-to-response&quot;&gt;Add custom header to response&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#add-custom-header-to-response&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;csharp&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;your-custom-header-id&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;custom_header_value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot; Response.Headers.Add(&amp;quot;your-custom-header-id&amp;quot;, custom_header_value);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;get-a-request-header-value&quot;&gt;Get a request header value&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#get-a-request-header-value&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;csharp&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;yourHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;your-custom-header-id&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FirstOrDefault&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot; var yourHeader = Request.Headers[&amp;quot;your-custom-header-id&amp;quot;].FirstOrDefault();&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;get-bearer-token-value&quot;&gt;Get bearer token value&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#get-bearer-token-value&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Another example where we get the bearer token from the &lt;strong&gt;Authorization&lt;/strong&gt; header,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;authHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Authorization&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;FirstOrDefault&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;authHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;authHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;StartsWith&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bearer&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StringComparison&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OrdinalIgnoreCase&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;loginToken&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;authHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Replace&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Bearer &amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Empty&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;StringComparison&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OrdinalIgnoreCase&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var authHeader = Request.Headers[&amp;quot;Authorization&amp;quot;].FirstOrDefault();if (authHeader != null &amp;amp;&amp;amp; authHeader.StartsWith(&amp;quot;Bearer&amp;quot;, StringComparison.OrdinalIgnoreCase)){    var loginToken = authHeader.Replace(&amp;quot;Bearer &amp;quot;, string.Empty, StringComparison.OrdinalIgnoreCase);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>aspnet-core</category><author>Abhith Rajan</author></item><item><title>Microsoft Orleans - Run Multiple Silos from a .NET Core Console App</title><link>https://www.abhith.net/blog/microsoft-orleans-run-multiple-silos-from-a-net-core-console-app/</link><guid isPermaLink="true">https://www.abhith.net/blog/microsoft-orleans-run-multiple-silos-from-a-net-core-console-app/</guid><description>If you are new to Microsoft Orleans and you are in a stage where you want to run multiple Silo from a single .NET Core console app, here is a way to achieve that.</description><pubDate>Wed, 24 Apr 2019 12:11:27 GMT</pubDate><content:encoded>&lt;p&gt;My Silo Host project &lt;code&gt;Program.cs&lt;/code&gt; &lt;strong&gt;Main&lt;/strong&gt; method looks like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Main&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;[] &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;siloPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;gatewayPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;try&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;siloPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Parse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;gatewayPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Parse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Exception&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;siloPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;11111&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;gatewayPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;30000&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;invariant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;System.Data.SqlClient&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// for Microsoft SQL Server&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;connectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Data Source=.;Initial Catalog=OrleansCluster;Integrated Security=True;Pooling=False;Max Pool Size=200;MultipleActiveResultSets=True&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;siloBuilder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SiloHostBuilder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Clustering information&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Configure&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;ClusterOptions&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ClusterId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;dev&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ServiceId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ServiceApp&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;UseAdoNetClustering&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Invariant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;invariant&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ConnectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;connectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ConfigureEndpoints&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;siloPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;siloPort&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;gatewayPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;gatewayPort&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ConfigureLogging&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;logging&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;logging&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddConsole&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;());&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;siloBuilder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;())&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;StartAsync&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ReadLine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;private static async Task Main(string[] args){    int siloPort, gatewayPort;    try    {        siloPort = int.Parse(args[0]);        gatewayPort = int.Parse(args[1]);    }    catch (Exception)    {        siloPort = 11111;        gatewayPort = 30000;    }    var invariant = &amp;quot;System.Data.SqlClient&amp;quot;; // for Microsoft SQL Server    var connectionString = &amp;quot;Data Source=.;Initial Catalog=OrleansCluster;Integrated Security=True;Pooling=False;Max Pool Size=200;MultipleActiveResultSets=True&amp;quot;;    var siloBuilder = new SiloHostBuilder()                    // Clustering information                    .Configure&lt;ClusterOptions&gt;(options =&gt;                    {                        options.ClusterId = &amp;quot;dev&amp;quot;;                        options.ServiceId = &amp;quot;ServiceApp&amp;quot;;                    })                    .UseAdoNetClustering(options =&gt;                    {                        options.Invariant = invariant;                        options.ConnectionString = connectionString;                    })                    .ConfigureEndpoints(siloPort: siloPort, gatewayPort: gatewayPort)                    .ConfigureLogging(logging =&gt; logging.AddConsole());    using (var host = siloBuilder.Build())    {        await host.StartAsync();        Console.ReadLine();    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;To run multiple Silo, we need to specify different set of ports for each. Here we are achieving the same via parsing the args.&lt;/p&gt;
&lt;p&gt;Now you can run a Silo by executing following command on the Silo project root directory&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;dotnet&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;lt;siloPort&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;lt;gatewayPort&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;dotnet run &lt;siloPort&gt; &lt;gatewayPort&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;eg,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;dotnet&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;11111&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;30000&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;dotnet&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;11112&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;30001&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;dotnet&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;11113&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;30002&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;dotnet run 11111 30000dotnet run 11112 30001dotnet run 11113 30002&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>microsoft-orleans</category><category>dotnet-core</category><author>Abhith Rajan</author></item><item><title>Best Visual Studio Code Extensions</title><link>https://www.abhith.net/blog/best-visual-studio-code-extensions/</link><guid isPermaLink="true">https://www.abhith.net/blog/best-visual-studio-code-extensions/</guid><description>My favorite extensions for Visual Studio Code</description><pubDate>Tue, 12 Feb 2019 17:50:10 GMT</pubDate><content:encoded>&lt;p&gt;If you ask which is my favorite &lt;strong&gt;IDE&lt;/strong&gt;, it is &lt;strong&gt;Visual Studio Code&lt;/strong&gt; a.k.a &lt;strong&gt;vscode&lt;/strong&gt;.
One major strength of &lt;strong&gt;vscode&lt;/strong&gt; is its extensions. And these are my favorites,&lt;/p&gt;
&lt;h2 id=&quot;favorites&quot;&gt;Favorites&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#favorites&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;aside class=&quot;alert alert--info&quot; role=&quot;note&quot; aria-label=&quot;Info&quot;&gt; &lt;p class=&quot;alert__title&quot;&gt;&lt;span class=&quot;alert__icon&quot; aria-hidden=&quot;true&quot;&gt;ℹ&lt;/span&gt;Info&lt;/p&gt; &lt;div class=&quot;alert__body&quot;&gt;&lt;p&gt;All the screenshots are from the vscode marketplace. If any link is broken,
please let me know.&lt;/p&gt;&lt;/div&gt; &lt;/aside&gt;
&lt;h3 id=&quot;angular-snippets-version-x&quot;&gt;Angular Snippets (Version X)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#angular-snippets-version-x&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=johnpapa.Angular2&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/johnpapa.Angular2.svg&quot; alt=&quot;Angular Snippets (Version X)&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/johnpapa.Angular2.svg&quot; alt=&quot;Angular Snippets (Version X)&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=johnpapa.Angular2&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Angular Snippets (Version X)&lt;/a&gt; by John Papa&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/johnpapa/vscode-angular-snippets/raw/HEAD/images/use-extension.gif&quot; alt=&quot;Angular Snippets (Version X)&quot;/&gt;&lt;figcaption&gt;Angular Snippets (Version X)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;The version in the title of this extension keeps changing as new Angular version releases, and that happens more frequently than I update this article, so keeping it as X.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;auto-close-tag&quot;&gt;Auto Close Tag&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#auto-close-tag&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/formulahendry.auto-close-tag.svg&quot; alt=&quot;Auto Close Tag&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/formulahendry.auto-close-tag.svg&quot; alt=&quot;Auto Close Tag&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Auto Close Tag&lt;/a&gt; automatically add HTML/XML close tag, same as Visual Studio IDE or Sublime Text.
From VS Code 1.16, it has built-in close tag support for HTML, Handlebars and Razor files. This extension is enabled for other languages like XML, PHP, Vue, JavaScript, TypeScript, JSX, TSX and so on. It is configurable.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/formulahendry/vscode-auto-close-tag/raw/HEAD/images/usage.gif&quot; alt=&quot;Auto Close Tag&quot;/&gt;&lt;figcaption&gt;Auto Close Tag&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;import-cost&quot;&gt;Import Cost&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#import-cost&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/wix.vscode-import-cost.svg&quot; alt=&quot;Import Cost&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/wix.vscode-import-cost.svg&quot; alt=&quot;Import Cost&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Import Cost&lt;/a&gt; display import/require package size in the editor&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://citw.dev/_next/image?url=%2fposts%2fimport-cost%2f1quov3TFpgG2ur7myCLGtsA.gif&amp;amp;w=1080&amp;amp;q=75&quot; alt=&quot;Import Cost&quot;/&gt;&lt;figcaption&gt;Import Cost&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;package-json-upgrade&quot;&gt;Package Json Upgrade&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#package-json-upgrade&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/codeandstuff.package-json-upgrade.svg&quot; alt=&quot;Package Json Upgrade&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/codeandstuff.package-json-upgrade.svg&quot; alt=&quot;Package Json Upgrade&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Package Json Upgrade&lt;/a&gt; shows available updates in package.json files. Offers quick fix command to update them and to show the changelog.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/pgsandstrom/package-json-upgrade/master/images/preview2.png&quot; alt=&quot;Package Json Upgrade&quot;/&gt;&lt;figcaption&gt;Package Json Upgrade&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;colorize&quot;&gt;colorize&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#colorize&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=kamikillerto.vscode-colorize&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/kamikillerto.vscode-colorize.svg&quot; alt=&quot;colorize&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/kamikillerto.vscode-colorize.svg&quot; alt=&quot;colorize&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=kamikillerto.vscode-colorize&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;colorize&lt;/a&gt; is a vscode extension to help visualize css colors in files.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/kamikillerto/vscode-colorize/master/assets/demo.gif&quot; alt=&quot;colorize&quot;/&gt;&lt;figcaption&gt;colorize&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;indent-rainbow&quot;&gt;indent-rainbow&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#indent-rainbow&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/oderwat.indent-rainbow.svg&quot; alt=&quot;indent-rainbow&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/oderwat.indent-rainbow.svg&quot; alt=&quot;indent-rainbow&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/itemdetails?itemName=oderwat.indent-rainbow&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;indent-rainbow&lt;/a&gt; makes indentation easier to read. This extension colorizes the indentation in front of your text alternating four different colors on each step.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/oderwat/vscode-indent-rainbow/master/assets/example.png&quot; alt=&quot;indent-rainbow&quot;/&gt;&lt;figcaption&gt;indent-rainbow&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;todo-tree&quot;&gt;Todo Tree&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#todo-tree&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/Gruntfuggly.todo-tree.svg&quot; alt=&quot;Todo Tree&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/Gruntfuggly.todo-tree.svg&quot; alt=&quot;Todo Tree&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Todo Tree&lt;/a&gt; show TODO, FIXME, etc. comment tags in a tree view.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/Gruntfuggly/todo-tree/master/resources/screenshot.png&quot; alt=&quot;Todo Tree&quot;/&gt;&lt;figcaption&gt;Todo Tree&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;prettier---code-formatter&quot;&gt;Prettier - Code formatter&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#prettier---code-formatter&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/esbenp.prettier-vscode.svg&quot; alt=&quot;Prettier - Code formatter&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/esbenp.prettier-vscode.svg&quot; alt=&quot;Prettier - Code formatter&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Prettier - Code formatter&lt;/a&gt; is the VS Code plugin for prettier/prettier&lt;/p&gt;
&lt;h3 id=&quot;better-comments&quot;&gt;Better Comments&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#better-comments&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/aaron-bond.better-comments.svg&quot; alt=&quot;Better Comments&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/aaron-bond.better-comments.svg&quot; alt=&quot;Better Comments&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Better Comments&lt;/a&gt; improves your code commenting by annotating with alert, informational, TODOs, and more!&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/aaron-bond/better-comments/raw/HEAD/images/better-comments.PNG&quot; alt=&quot;Better Comments&quot;/&gt;&lt;figcaption&gt;Better Comments&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;vscode-great-icons&quot;&gt;VSCode Great Icons&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#vscode-great-icons&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=emmanuelbeziat.vscode-great-icons&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/emmanuelbeziat.vscode-great-icons.svg&quot; alt=&quot;VSCode Great Icons&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/emmanuelbeziat.vscode-great-icons.svg&quot; alt=&quot;VSCode Great Icons&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=emmanuelbeziat.vscode-great-icons&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;VSCode Great Icons&lt;/a&gt; contains a big pack of icons (200+) for your files.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/EmmanuelBeziat/vscode-great-icons/icons-test/icons.jpg&quot; alt=&quot;VSCode Great Icons&quot;/&gt;&lt;figcaption&gt;VSCode Great Icons&lt;/figcaption&gt;&lt;/figure&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;VSCode Great Icons is my current favorite icon set. What’s your favorite? &lt;a href=&quot;https://t.co/RhHVKtv94b&quot;&gt;https://t.co/RhHVKtv94b&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/1551616681017053185?ref_src=twsrc%5Etfw&quot;&gt;July 25, 2022&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;h3 id=&quot;markdown-preview-mermaid-support&quot;&gt;Markdown Preview Mermaid Support&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#markdown-preview-mermaid-support&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/bierner.markdown-mermaid.svg&quot; alt=&quot;Markdown Preview Mermaid Support&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/bierner.markdown-mermaid.svg&quot; alt=&quot;Markdown Preview Mermaid Support&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Markdown Preview Mermaid Support&lt;/a&gt; adds Mermaid diagram and flowchart support to VS Code’s builtin markdown preview.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/mjbvz/vscode-markdown-mermaid/raw/master/docs/example.png&quot; alt=&quot;A mermaid diagram in VS Code&apos;s built-in markdown preview&quot;/&gt;&lt;figcaption&gt;A mermaid diagram in VS Code&amp;#39;s built-in markdown preview&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;gistpad&quot;&gt;GistPad&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#gistpad&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/vsls-contrib.gistfs.svg&quot; alt=&quot;GistPad&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/vsls-contrib.gistfs.svg&quot; alt=&quot;GistPad&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GistPad&lt;/a&gt; manage your code snippets and developer notes using GitHub Gists and repositories.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/116461/69910156-96274b80-13fe-11ea-9be4-d801f4e9c377.gif&quot; alt=&quot;GistPad&quot;/&gt;&lt;figcaption&gt;GistPad&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;git-graph&quot;&gt;Git Graph&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#git-graph&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/mhutchie.git-graph.svg&quot; alt=&quot;Git Graph&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/mhutchie.git-graph.svg&quot; alt=&quot;Git Graph&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Git Graph&lt;/a&gt; lets you view a Git Graph of your repository, and perform Git actions from the graph.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/mhutchie/vscode-git-graph/raw/master/resources/demo.gif&quot; alt=&quot;Git Graph&quot;/&gt;&lt;figcaption&gt;Git Graph&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;html-end-tag-labels&quot;&gt;HTML End Tag Labels&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#html-end-tag-labels&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=anteprimorac.html-end-tag-labels&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/anteprimorac.html-end-tag-labels.svg&quot; alt=&quot;HTML End Tag Labels&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/anteprimorac.html-end-tag-labels.svg&quot; alt=&quot;HTML End Tag Labels&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=anteprimorac.html-end-tag-labels&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;HTML End Tag Labels&lt;/a&gt; labels HTML end tags in VSCode.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/anteprimorac/vscode-html-end-tag-labels/raw/HEAD/images/screenshot-1.png&quot; alt=&quot;HTML End Tag Labels&quot;/&gt;&lt;figcaption&gt;HTML End Tag Labels&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;hungry-delete&quot;&gt;Hungry Delete&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#hungry-delete&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=jasonlhy.hungry-delete&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/jasonlhy.hungry-delete.svg&quot; alt=&quot;Hungry Delete&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/jasonlhy.hungry-delete.svg&quot; alt=&quot;Hungry Delete&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=jasonlhy.hungry-delete&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Hungry Delete&lt;/a&gt; is to delete an entire block of whitespace or tab, and reduce the time programmers need to press backspace.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/Jasonlhy/VSCode-Hungry-Delete/raw/HEAD/images/after.gif&quot; alt=&quot;Hungry Delete&quot;/&gt;&lt;figcaption&gt;Hungry Delete&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;inline-parameters-for-vscode&quot;&gt;Inline Parameters for VSCode&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#inline-parameters-for-vscode&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=liamhammett.inline-parameters&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/liamhammett.inline-parameters.svg&quot; alt=&quot;Inline Parameters for VSCode&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/liamhammett.inline-parameters.svg&quot; alt=&quot;Inline Parameters for VSCode&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=liamhammett.inline-parameters&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Inline Parameters for VSCode&lt;/a&gt; does function parameter annotations displaying inline in VSCode.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/imliam/vscode-inline-parameters/master/example.gif&quot; alt=&quot;Inline Parameters for VSCode&quot;/&gt;&lt;figcaption&gt;Inline Parameters for VSCode&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;project-manager&quot;&gt;Project Manager&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#project-manager&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/alefragnani.project-manager.svg&quot; alt=&quot;Project Manager&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/alefragnani.project-manager.svg&quot; alt=&quot;Project Manager&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Project Manager&lt;/a&gt; lets you easily switch between projects.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/alefragnani/vscode-project-manager/raw/HEAD/images/vscode-project-manager-side-bar.png&quot; alt=&quot;Project Manager&quot;/&gt;&lt;figcaption&gt;Project Manager&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;regex-previewer&quot;&gt;Regex Previewer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#regex-previewer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=chrmarti.regex&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/chrmarti.regex.svg&quot; alt=&quot;Regex Previewer&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/chrmarti.regex.svg&quot; alt=&quot;Regex Previewer&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=chrmarti.regex&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Regex Previewer&lt;/a&gt; is the regex matches previewer for JavaScript, TypeScript, PHP and Haxe in Visual Studio Code.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/chrmarti/vscode-regex/raw/main/images/in_action.gif&quot; alt=&quot;Regex Previewer&quot;/&gt;&lt;figcaption&gt;Regex Previewer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;markdown-all-in-one&quot;&gt;Markdown All in One&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#markdown-all-in-one&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/yzhang.markdown-all-in-one.svg&quot; alt=&quot;Markdown All in One&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/yzhang.markdown-all-in-one.svg&quot; alt=&quot;Markdown All in One&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Markdown All in One&lt;/a&gt; is All you need to write Markdown (keyboard shortcuts, table of contents, auto preview and more)&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://github.com/yzhang-gh/vscode-markdown/raw/master/images/gifs/section-numbers.gif&quot; alt=&quot;Markdown All in One&quot;/&gt;&lt;figcaption&gt;Markdown All in One&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h3 id=&quot;github-copilot&quot;&gt;GitHub Copilot&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#github-copilot&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=GitHub.copilot&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/GitHub.copilot.svg&quot; alt=&quot;GitHub Copilot&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/GitHub.copilot.svg&quot; alt=&quot;GitHub Copilot&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=GitHub.copilot&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GitHub Copilot&lt;/a&gt; is your AI pair programmer.&lt;/p&gt;
&lt;h4 id=&quot;subscription&quot;&gt;Subscription&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#subscription&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;GitHub Copilot requires a subscription. It is free for verified students and maintainers of popular open source projects on GitHub.&lt;/p&gt;
&lt;h2 id=&quot;other-extensions-i-use&quot;&gt;Other Extensions I Use&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#other-extensions-i-use&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;azure&quot;&gt;Azure&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#azure&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;azure-account&quot;&gt;Azure Account&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#azure-account&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-vscode.azure-account.svg&quot; alt=&quot;Azure Account&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-vscode.azure-account.svg&quot; alt=&quot;Azure Account&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Azure Account&lt;/a&gt; is a common Sign-In and Subscription management extension for VS Code.&lt;/p&gt;
&lt;h4 id=&quot;azure-resources&quot;&gt;Azure Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#azure-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-azuretools.vscode-azureresourcegroups.svg&quot; alt=&quot;Azure Resources&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-azuretools.vscode-azureresourcegroups.svg&quot; alt=&quot;Azure Resources&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Azure Resources&lt;/a&gt; is an extension for viewing and managing Azure resources..&lt;/p&gt;
&lt;h4 id=&quot;bridge-to-kubernetes&quot;&gt;Bridge to Kubernetes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bridge-to-kubernetes&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mindaro.mindaro&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/mindaro.mindaro.svg&quot; alt=&quot;Bridge to Kubernetes&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/mindaro.mindaro.svg&quot; alt=&quot;Bridge to Kubernetes&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mindaro.mindaro&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Bridge to Kubernetes&lt;/a&gt; enables rapid Kubernetes development for teams.&lt;/p&gt;
&lt;h4 id=&quot;kubernetes&quot;&gt;Kubernetes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#kubernetes&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-kubernetes-tools.vscode-kubernetes-tools.svg&quot; alt=&quot;Kubernetes&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-kubernetes-tools.vscode-kubernetes-tools.svg&quot; alt=&quot;Kubernetes&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Kubernetes&lt;/a&gt; enables VS Code to develop, deploy and debug Kubernetes applications.&lt;/p&gt;
&lt;hr/&gt;
&lt;h3 id=&quot;debuggers&quot;&gt;Debuggers&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#debuggers&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;dapr&quot;&gt;Dapr&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dapr&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-dapr&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-azuretools.vscode-dapr.svg&quot; alt=&quot;Dapr&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-azuretools.vscode-dapr.svg&quot; alt=&quot;Dapr&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-dapr&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dapr&lt;/a&gt; makes it easy to run, debug, and interact with Dapr-enabled applications.&lt;/p&gt;
&lt;h4 id=&quot;microsoft-edge-tools-for-vs-code&quot;&gt;Microsoft Edge Tools for VS Code&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#microsoft-edge-tools-for-vs-code&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-edgedevtools.vscode-edge-devtools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-edgedevtools.vscode-edge-devtools.svg&quot; alt=&quot;Microsoft Edge Tools for VS Code&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-edgedevtools.vscode-edge-devtools.svg&quot; alt=&quot;Microsoft Edge Tools for VS Code&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-edgedevtools.vscode-edge-devtools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Microsoft Edge Tools for VS Code&lt;/a&gt; enables you to use the Microsoft Edge Tools from within VS Code to see your site’s runtime HTML structure, alter its layout, fix styling issues as well as see your site’s network requests.&lt;/p&gt;
&lt;hr/&gt;
&lt;h3 id=&quot;programming-languages&quot;&gt;Programming Languages&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#programming-languages&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;net-core-test-explorer&quot;&gt;.NET Core Test Explorer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#net-core-test-explorer&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.dotnet-test-explorer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/formulahendry.dotnet-test-explorer.svg&quot; alt=&quot;.NET Core Test Explorer&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/formulahendry.dotnet-test-explorer.svg&quot; alt=&quot;.NET Core Test Explorer&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.dotnet-test-explorer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;.NET Core Test Explorer&lt;/a&gt; is the test Explorer for .NET Core (MSTest, xUnit, NUnit).&lt;/p&gt;
&lt;h4 id=&quot;c35&quot;&gt;C&amp;amp;#35&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#c35&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-dotnettools.csharp.svg&quot; alt=&quot;C#&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-dotnettools.csharp.svg&quot; alt=&quot;C#&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;C#&lt;/a&gt; for Visual Studio Code (powered by OmniSharp)..&lt;/p&gt;
&lt;h4 id=&quot;docker&quot;&gt;Docker&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#docker&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-azuretools.vscode-docker.svg&quot; alt=&quot;Docker&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-azuretools.vscode-docker.svg&quot; alt=&quot;Docker&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Docker&lt;/a&gt; makes it easy to create, manage, and debug containerized applications.&lt;/p&gt;
&lt;h4 id=&quot;eslint&quot;&gt;ESLint&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#eslint&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/dbaeumer.vscode-eslint.svg&quot; alt=&quot;ESLint&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/dbaeumer.vscode-eslint.svg&quot; alt=&quot;ESLint&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ESLint&lt;/a&gt; integrates ESLint JavaScript into VS Code.&lt;/p&gt;
&lt;h4 id=&quot;javascript-booster&quot;&gt;JavaScript Booster&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#javascript-booster&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=sburg.vscode-javascript-booster&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/sburg.vscode-javascript-booster.svg&quot; alt=&quot;JavaScript Booster&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/sburg.vscode-javascript-booster.svg&quot; alt=&quot;JavaScript Booster&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=sburg.vscode-javascript-booster&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;JavaScript Booster&lt;/a&gt; enables you to boost your productivity with advanced JavaScript/TypeScript refactorings and commands&lt;/p&gt;
&lt;h4 id=&quot;mdx&quot;&gt;MDX&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#mdx&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=silvenon.mdx&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/silvenon.mdx.svg&quot; alt=&quot;MDX&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/silvenon.mdx.svg&quot; alt=&quot;MDX&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=silvenon.mdx&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;MDX&lt;/a&gt; Provides syntax highlighting and bracket matching for MDX (JSX in Markdown) files.&lt;/p&gt;
&lt;h4 id=&quot;powershell&quot;&gt;PowerShell&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#powershell&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-vscode.PowerShell.svg&quot; alt=&quot;PowerShell&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-vscode.PowerShell.svg&quot; alt=&quot;PowerShell&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;PowerShell&lt;/a&gt; enables you to develop PowerShell scripts in Visual Studio Code!&lt;/p&gt;
&lt;h4 id=&quot;sql-server-mssql&quot;&gt;SQL Server (mssql)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#sql-server-mssql&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ms-mssql.mssql.svg&quot; alt=&quot;SQL Server (mssql)&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ms-mssql.mssql.svg&quot; alt=&quot;SQL Server (mssql)&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SQL Server (mssql)&lt;/a&gt; enables to develop Microsoft SQL Server, Azure SQL Database and SQL Data Warehouse on VS Code.&lt;/p&gt;
&lt;h4 id=&quot;vetur&quot;&gt;Vetur&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#vetur&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=octref.vetur&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/octref.vetur.svg&quot; alt=&quot;Vetur&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=octref.vetur&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/octref.vetur.svg&quot; alt=&quot;Vetur&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Vue tooling for VS Code&lt;/p&gt;
&lt;hr/&gt;
&lt;h3 id=&quot;snippets&quot;&gt;Snippets&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#snippets&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;document-this&quot;&gt;Document This&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#document-this&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=joelday.docthis&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/joelday.docthis.svg&quot; alt=&quot;Document This&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=joelday.docthis&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/joelday.docthis.svg&quot; alt=&quot;Document This&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=joelday.docthis&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Document This&lt;/a&gt; automatically generates detailed JSDoc comments in TypeScript and JavaScript files.&lt;/p&gt;
&lt;h4 id=&quot;es7-reactreduxgraphqlreact-native-snippets&quot;&gt;ES7 React/Redux/GraphQL/React-Native snippets&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#es7-reactreduxgraphqlreact-native-snippets&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/dsznajder.es7-react-js-snippets.svg&quot; alt=&quot;ES7 React/Redux/GraphQL/React-Native snippets&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/dsznajder.es7-react-js-snippets.svg&quot; alt=&quot;ES7 React/Redux/GraphQL/React-Native snippets&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/itemdetails?itemName=dsznajder.es7-react-js-snippets&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ES7 React/Redux/GraphQL/React-Native snippets&lt;/a&gt; contains simple extensions for React, Redux and Graphql in JS/TS with ES7 syntax&lt;/p&gt;
&lt;h4 id=&quot;icon-fonts&quot;&gt;Icon Fonts&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#icon-fonts&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=idleberg.icon-fonts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/idleberg.icon-fonts.svg&quot; alt=&quot;Icon Fonts&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=idleberg.icon-fonts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/idleberg.icon-fonts.svg&quot; alt=&quot;Icon Fonts&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=idleberg.icon-fonts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Icon Fonts&lt;/a&gt; contains snippets for popular icon fonts such as Font Awesome, Ionicons, Glyphicons, Octicons, Material Design Icons and many more!&lt;/p&gt;
&lt;h4 id=&quot;surround&quot;&gt;Surround&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#surround&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=yatki.vscode-surround&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/yatki.vscode-surround.svg&quot; alt=&quot;Surround&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/yatki.vscode-surround.svg&quot; alt=&quot;Surround&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=yatki.vscode-surround&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Surround&lt;/a&gt; is a simple yet powerful extension to add wrapper templates around your code blocks.&lt;/p&gt;
&lt;hr/&gt;
&lt;h3 id=&quot;other&quot;&gt;Other&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#other&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;auto-rename-tag&quot;&gt;Auto Rename Tag&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#auto-rename-tag&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/formulahendry.auto-rename-tag.svg&quot; alt=&quot;Auto Rename Tag&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/formulahendry.auto-rename-tag.svg&quot; alt=&quot;Auto Rename Tag&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Auto Rename Tag&lt;/a&gt; as the name suggests, auto rename paired HTML/XML tag.&lt;/p&gt;
&lt;h4 id=&quot;codetour&quot;&gt;CodeTour&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#codetour&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/vsls-contrib.codetour.svg&quot; alt=&quot;CodeTour&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/vsls-contrib.codetour.svg&quot; alt=&quot;CodeTour&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CodeTour&lt;/a&gt; allows you to record and playback guided tours of codebases, directly within the editor.&lt;/p&gt;
&lt;h4 id=&quot;highlight-matching-tag&quot;&gt;Highlight Matching Tag&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#highlight-matching-tag&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/vincaslt.highlight-matching-tag.svg&quot; alt=&quot;Highlight Matching Tag&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/vincaslt.highlight-matching-tag.svg&quot; alt=&quot;Highlight Matching Tag&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/itemdetails?itemName=vincaslt.highlight-matching-tag&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Highlight Matching Tag&lt;/a&gt; highlights matching closing or opening tag&lt;/p&gt;
&lt;h4 id=&quot;live-server&quot;&gt;Live Server&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#live-server&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ritwickdey.LiveServer.svg&quot; alt=&quot;Live Server&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ritwickdey.LiveServer.svg&quot; alt=&quot;Live Server&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Live Server&lt;/a&gt; launch a development local Server with live reload feature for static &amp;amp; dynamic pages&lt;/p&gt;
&lt;h4 id=&quot;markdownlint&quot;&gt;markdownlint&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#markdownlint&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/DavidAnson.vscode-markdownlint.svg&quot; alt=&quot;markdownlint&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/DavidAnson.vscode-markdownlint.svg&quot; alt=&quot;markdownlint&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;markdownlint&lt;/a&gt; provides Markdown linting and style checking for Visual Studio Code.&lt;/p&gt;
&lt;h4 id=&quot;markdown-shortcuts&quot;&gt;Markdown Shortcuts&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#markdown-shortcuts&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mdickin.markdown-shortcuts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/mdickin.markdown-shortcuts.svg&quot; alt=&quot;Markdown Shortcuts&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mdickin.markdown-shortcuts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/mdickin.markdown-shortcuts.svg&quot; alt=&quot;Markdown Shortcuts&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=mdickin.markdown-shortcuts&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Markdown Shortcuts&lt;/a&gt; provide Shortcuts for Markdown editing.&lt;/p&gt;
&lt;h4 id=&quot;npm-intellisense&quot;&gt;npm Intellisense&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#npm-intellisense&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/christian-kohler.npm-intellisense.svg&quot; alt=&quot;npm Intellisense&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/christian-kohler.npm-intellisense.svg&quot; alt=&quot;npm Intellisense&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;npm Intellisense&lt;/a&gt; is a visual Studio Code plugin that autocompletes npm modules in import statements&lt;/p&gt;
&lt;h4 id=&quot;peacock&quot;&gt;Peacock&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#peacock&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/johnpapa.vscode-peacock.svg&quot; alt=&quot;Peacock&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/johnpapa.vscode-peacock.svg&quot; alt=&quot;Peacock&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Peacock&lt;/a&gt; subtly change the workspace color of your workspace. Ideal when you have multiple VS Code instances and you want to quickly identify which is which.&lt;/p&gt;
&lt;h4 id=&quot;search-node_modules&quot;&gt;Search node_modules&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#search-node_modules&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=jasonnutter.search-node-modules&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/jasonnutter.search-node-modules.svg&quot; alt=&quot;Search node_modules&quot;/&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/jasonnutter.search-node-modules.svg&quot; alt=&quot;Search node_modules&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=jasonnutter.search-node-modules&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Search node_modules&lt;/a&gt; enables to quickly search the node_modules folder.&lt;/p&gt;
&lt;h4 id=&quot;turbo-console-log&quot;&gt;Turbo Console Log&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#turbo-console-log&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ChakrounAnas.turbo-console-log&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/ChakrounAnas.turbo-console-log.svg&quot; alt=&quot;Turbo Console Log&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ChakrounAnas.turbo-console-log&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/ChakrounAnas.turbo-console-log.svg&quot; alt=&quot;Turbo Console Log&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ChakrounAnas.turbo-console-log&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Turbo Console Log&lt;/a&gt; enables automating the process of writing meaningful log messages.&lt;/p&gt;
&lt;h4 id=&quot;bookmarks&quot;&gt;Bookmarks&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bookmarks&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/alefragnani.Bookmarks.svg&quot; alt=&quot;Bookmarks&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/alefragnani.Bookmarks.svg&quot; alt=&quot;Bookmarks&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Bookmarks&lt;/a&gt; enables you to mark lines and jump to them&lt;/p&gt;
&lt;h4 id=&quot;code-spell-checker&quot;&gt;Code Spell Checker&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#code-spell-checker&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/streetsidesoftware.code-spell-checker.svg&quot; alt=&quot;Code Spell Checker&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/streetsidesoftware.code-spell-checker.svg&quot; alt=&quot;Code Spell Checker&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Code Spell Checker&lt;/a&gt; is a spelling checker for source code&lt;/p&gt;
&lt;h4 id=&quot;git-history&quot;&gt;Git History&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#git-history&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/donjayamanne.githistory.svg&quot; alt=&quot;Git History&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/donjayamanne.githistory.svg&quot; alt=&quot;Git History&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Git History&lt;/a&gt; enables you to view git log, file history, compare branches or commits&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/DonJayamanne/gitHistoryVSCode/master/images/gitLogv3.gif&quot; alt=&quot;Git History&quot;/&gt;&lt;figcaption&gt;Git History&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h4 id=&quot;path-intellisense&quot;&gt;Path Intellisense&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#path-intellisense&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/christian-kohler.path-intellisense.svg&quot; alt=&quot;Path Intellisense&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/christian-kohler.path-intellisense.svg&quot; alt=&quot;Path Intellisense&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Path Intellisense&lt;/a&gt; is a Visual Studio Code plugin that autocompletes filenames.&lt;/p&gt;
&lt;h2 id=&quot;more&quot;&gt;More&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#more&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Azure Static Web Apps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Dart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Flutter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.toptal.com/visual-studio/vscode-tips-power-users?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;VSCode Tips for Power Users&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://towardsdatascience.com/best-vs-code-extensions-of-2022-e9b49990cb4b?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-visual-studio-code-extensions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;My Favorite VS Code Extensions of 2022 | by Mark Did | Towards Data Science&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2022-07-27&quot;&gt;2022-07-27&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-07-27&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Rewritten after cross checking with what is actually installed on my side currently.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2022-04-18&quot;&gt;2022-04-18&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-04-18&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added &lt;code&gt;Package Json Upgrade&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2022-03-31&quot;&gt;2022-03-31&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-03-31&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added &lt;code&gt;Markdown Preview Mermaid Support&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>vscode</category><category>ide</category><category>awesome-list</category><author>Abhith Rajan</author></item><item><title>Project management - Organize issues using labels</title><link>https://www.abhith.net/blog/project-management-organize-issues-using-labels/</link><guid isPermaLink="true">https://www.abhith.net/blog/project-management-organize-issues-using-labels/</guid><description>Here I am listing the labels which I used to organize my tasks in almost all the project management solutions like Jira, Gitlab and GitHub.</description><pubDate>Wed, 06 Feb 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Labels are a good way to categorize the tasks. But having too many in an unorganized way results more clutter.
Here is my way of labeling issues/tasks. This is the way I organize my tasks in &lt;strong&gt;GitHub&lt;/strong&gt;, &lt;strong&gt;GitLab&lt;/strong&gt; and in &lt;strong&gt;Jira&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;area&quot;&gt;Area&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#area&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Indicating the area to which issues belong.&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#8bd9e5;color:#1f2328&quot;&gt;optimization&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Fine tuning works&lt;/td&gt;&lt;td&gt;&lt;code&gt;#8bd9e5&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;security&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#ccbef7;color:#1f2328&quot;&gt;ux&lt;/span&gt;&lt;/td&gt;&lt;td&gt;User experience&lt;/td&gt;&lt;td&gt;&lt;code&gt;#ccbef7&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h3 id=&quot;priority&quot;&gt;Priority&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#priority&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Used to prioritize the issues.&lt;/p&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#d93f0b;color:#fff&quot;&gt;P0&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Requires immediate attention&lt;/td&gt;&lt;td&gt;&lt;code&gt;#d93f0b&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P1&lt;/td&gt;&lt;td&gt;Requires attention soon&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P2&lt;/td&gt;&lt;td&gt;Does not require immediate attention&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#f5f5f5;color:#1f2328&quot;&gt;P3&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Low priority items&lt;/td&gt;&lt;td&gt;&lt;code&gt;f5f5f5&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Previously I was using,&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#d93f0b;color:#fff&quot;&gt;priority/high&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Requires immediate attention&lt;/td&gt;&lt;td&gt;&lt;code&gt;#d93f0b&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;priority/medium&lt;/td&gt;&lt;td&gt;Requires attention soon&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;priority/low&lt;/td&gt;&lt;td&gt;Does not require immediate attention&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h3 id=&quot;stage&quot;&gt;Stage&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#stage&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Indicating the current stage of the issue.&lt;/p&gt;































































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FFD700;color:#1f2328&quot;&gt;awaiting-response&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Potential fix was proposed; awaiting response&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FFD700&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;backlog&lt;/td&gt;&lt;td&gt;Prioritized to be picked up in current sprint&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FF0000;color:#fff&quot;&gt;blocked&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Work that is currently impeded or unable to progress due to external factors or dependencies&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FF0000&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FFA500;color:#1f2328&quot;&gt;blocking&lt;/span&gt;&lt;/td&gt;&lt;td&gt;This issue is blocking the progress of other related tasks&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FFA500&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;in-test&lt;/td&gt;&lt;td&gt;Deployed to TEST environment&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;investigating&lt;/td&gt;&lt;td&gt;Someone is looking into this&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FF9900;color:#1f2328&quot;&gt;needs-information&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Tasks or issues that lack essential information and require additional details before proceeding&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FF9900&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;needs-investigating&lt;/td&gt;&lt;td&gt;Someone needs to look at this&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FFD700;color:#1f2328&quot;&gt;needs-qa-review&lt;/span&gt;&lt;/td&gt;&lt;td&gt;The feature branch is ready for QA&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FFD700&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FFA500;color:#1f2328&quot;&gt;qa-in-progress&lt;/span&gt;&lt;/td&gt;&lt;td&gt;QA testing is currently in progress for this feature branch&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FFA500&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#2E8B57;color:#1f2328&quot;&gt;ready-for-merge&lt;/span&gt;&lt;/td&gt;&lt;td&gt;The branch has passed QA and is ready to be merged into the main branch&lt;/td&gt;&lt;td&gt;&lt;code&gt;#2E8B57&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;needs-review&lt;/td&gt;&lt;td&gt;Work done but needs review&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pending-release&lt;/td&gt;&lt;td&gt;Works associated with this issue is done but not deployed&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;proposal&lt;/td&gt;&lt;td&gt;No work has been done of this issue&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ready-for-work&lt;/td&gt;&lt;td&gt;The issue is reproducible and in scope&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;wontfix&lt;/td&gt;&lt;td&gt;Does not regard this as an issue or will not implement this feature&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#68db1c;color:#fff&quot;&gt;work-in-progress&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Someone is working on it&lt;/td&gt;&lt;td&gt;&lt;code&gt;#68db1c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Stage&lt;/strong&gt; labels like &lt;em&gt;in progress, backlog&lt;/em&gt; etc can be skipped in &lt;strong&gt;GitHub&lt;/strong&gt; if you linked the issue to a project which has relevant columns matching these stages.&lt;/p&gt;
&lt;h3 id=&quot;kind&quot;&gt;Kind&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#kind&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Used to categorize the issues.&lt;/p&gt;

































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#91085D;color:#fff&quot;&gt;breaking&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Breaking change&lt;/td&gt;&lt;td&gt;&lt;code&gt;#91085D&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#ee0701;color:#fff&quot;&gt;bug&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Something isn’t working&lt;/td&gt;&lt;td&gt;&lt;code&gt;#ee0701&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#2C4B5A;color:#fff&quot;&gt;chore&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Work is required w/ no deliverable to end user&lt;/td&gt;&lt;td&gt;&lt;code&gt;#2C4B5A&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#893aff;color:#fff&quot;&gt;comment&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Comments created via utteranc.es&lt;/td&gt;&lt;td&gt;&lt;code&gt;#893aff&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#5F6D58;color:#fff&quot;&gt;documentation&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Improvements or additions to documentation&lt;/td&gt;&lt;td&gt;&lt;code&gt;#5F6D58&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#6cc644;color:#1f2328&quot;&gt;dependencies&lt;/span&gt;&lt;/td&gt;&lt;td&gt;For managing project dependencies&lt;/td&gt;&lt;td&gt;&lt;code&gt;#6cc644&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#cfd3d7;color:#1f2328&quot;&gt;duplicate&lt;/span&gt;&lt;/td&gt;&lt;td&gt;This issue already exists&lt;/td&gt;&lt;td&gt;&lt;code&gt;#cfd3d7&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#62fcbe;color:#1f2328&quot;&gt;feature&lt;/span&gt;&lt;/td&gt;&lt;td&gt;New feature that does not currently exist&lt;/td&gt;&lt;td&gt;&lt;code&gt;#62fcbe&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#6550ba;color:#fff&quot;&gt;enhancement&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Requested enhancement of existing feature&lt;/td&gt;&lt;td&gt;&lt;code&gt;#6550ba&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#d876e3;color:#fff&quot;&gt;question&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Further information is requested&lt;/td&gt;&lt;td&gt;&lt;code&gt;#d876e3&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#926342;color:#fff&quot;&gt;test&lt;/span&gt;&lt;/td&gt;&lt;td&gt;This tests something&lt;/td&gt;&lt;td&gt;&lt;code&gt;#926342&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h3 id=&quot;more&quot;&gt;More&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#more&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#D619AD;color:#fff&quot;&gt;dependent&lt;/span&gt;&lt;/td&gt;&lt;td&gt;This issue is dependent on the resolution of another issue&lt;/td&gt;&lt;td&gt;&lt;code&gt;#D619AD&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#40D256;color:#1f2328&quot;&gt;proactive&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Tasks deliberately chosen from backlog, utilizing available time within the current sprint&lt;/td&gt;&lt;td&gt;&lt;code&gt;#40D256&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;stale&lt;/td&gt;&lt;td&gt;Issues with no activity for long time&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class=&quot;badge&quot; style=&quot;background-color:#FF5733;color:#1f2328&quot;&gt;unplanned&lt;/span&gt;&lt;/td&gt;&lt;td&gt;Work that has arisen unexpectedly and requires immediate attention or action&lt;/td&gt;&lt;td&gt;&lt;code&gt;#FF5733&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;If you are a colorful person 😉 , suggest me some colors for these labels in the comments 👇&lt;/p&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2024-10-17&quot;&gt;2024-10-17&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2024-10-17&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added needs-qa-review, qa-in-progress, ready-for-merge&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2022-07-21&quot;&gt;2022-07-21&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-07-21&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Labels changed to non-prefix format.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>project-management</category><category>github</category><category>gitlab</category><category>jira</category><category>style-guide</category><author>Abhith Rajan</author></item><item><title>GitLab - Clone a repository when 2FA enabled</title><link>https://www.abhith.net/blog/gitlab-clone-a-repository-when-2fa-enabled/</link><guid isPermaLink="true">https://www.abhith.net/blog/gitlab-clone-a-repository-when-2fa-enabled/</guid><description>You need to use a personal access token to clone your repository from GitLab when Two Factor authentication is enabled. Which explained here.</description><pubDate>Wed, 19 Dec 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I love services which provide extra security. One way to provide such a level security is by using Two Factor Authentication (2FA). GitLab provides 2FA, and I enabled it. After that, cloning a repository will not work in the usual mode,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;clone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;https://gitlab.com/username/projectname.git&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;git clone https://gitlab.com/username/projectname.git&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It will result&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Cloning&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;into&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;projectname&amp;#39;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;remote:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;HTTP&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Basic:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Access&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;denied&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;remote:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;You&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;must&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;personal&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;access&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;token&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;with&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;api&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Git&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;over&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;HTTP.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;remote:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;You&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;can&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;generate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;one&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;at&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;https://gitlab.com/profile/personal_access_tokens&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;fatal:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Authentication&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;failed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;https://gitlab.com/username/projectname.git/&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Cloning into &apos;projectname&apos;...remote: HTTP Basic: Access deniedremote: You must use a personal access token with &apos;api&apos; scope for Git over HTTP.remote: You can generate one at https://gitlab.com/profile/personal_access_tokensfatal: Authentication failed for &apos;https://gitlab.com/username/projectname.git/&apos;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;As the response suggest, we need to create a personal access token.&lt;/p&gt;
&lt;h3 id=&quot;creating-a-personal-access-token&quot;&gt;Creating a personal access token&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#creating-a-personal-access-token&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Log in to your GitLab account.&lt;/li&gt;
&lt;li&gt;Go to your Profile settings.&lt;/li&gt;
&lt;li&gt;Go to Access tokens.&lt;/li&gt;
&lt;li&gt;Choose a name and optionally an expiry date for the token.&lt;/li&gt;
&lt;li&gt;Choose the desired scopes (api access).&lt;/li&gt;
&lt;li&gt;Click on Create personal access token.&lt;/li&gt;
&lt;li&gt;Save the personal access token somewhere safe. Once you leave or refresh the page, you won’t be able to access it again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once you have created your personal access token, try cloning by&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;clone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;https://oauth2:PERSONAL_ACCESS_TOKEN@gitlab.com/username/projectname.git&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;git clone https://oauth2:PERSONAL_ACCESS_TOKEN@gitlab.com/username/projectname.git&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace ‘PERSONAL_ACCESS_TOKEN’ with the token you have generated.&lt;/p&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=gitlab-clone-a-repository-when-2fa-enabled&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Personal access tokens | GitLab&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>gitlab</category><category>git</category><author>Abhith Rajan</author></item><item><title>Filtering, Paging and Sorting in SQL Server 2008</title><link>https://www.abhith.net/blog/filtering-paging-and-sorting-in-sql-server-2008/</link><guid isPermaLink="true">https://www.abhith.net/blog/filtering-paging-and-sorting-in-sql-server-2008/</guid><description>This article provide one solution to achieve server side paging, sorting and filtering in SQL Server 2008.</description><pubDate>Thu, 22 Nov 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Stored procedure&lt;/strong&gt; to achieve paging, sorting and filtering in SQL Server 2008 is given below.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;PROCEDURE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [dbo].[uspTableNameOperationName] @Query      &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;@Offset     &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;@PageSize   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;@Sorting    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;ID DESC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;                           &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;@TotalCount &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OUTPUT&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;BEGIN&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;NOCOUNT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;LTRIM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;RTRIM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Query));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @TotalCount &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;COUNT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;([Id])&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [dbo].[TableName]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; IsDeleted &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (@Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;IS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;NULL&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OR&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnOne] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OR&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnTwo] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; CTEResults&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; Id,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[ColumnOne],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[ColumnTwo],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[ColumnThree],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;ROW_NUMBER&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OVER&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ORDER BY&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CASE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Sorting &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;ID DESC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Id]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;DESC&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CASE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Sorting &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;ID ASC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [Id]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ASC&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CASE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Sorting &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;COLUMNONE ASC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnOne]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ASC&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CASE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Sorting &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;COLUMNONE DESC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnOne]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;DESC&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CASE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Sorting &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;COLUMNTWO ASC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnTwo]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ASC&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;CASE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Sorting &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;COLUMNTWO DESC&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnTwo]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;DESC&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; RowNum&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [dbo].[TableName]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; IsDeleted &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (@Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;IS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;NULL&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OR&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnOne] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;OR&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; [ColumnTwo] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @Query &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; CTEResults&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; RowNum &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;BETWEEN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @Offset &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(@Offset &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; @PageSize);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;CREATE PROCEDURE [dbo].[uspTableNameOperationName] @Query      NVARCHAR(50) = NULL,                           @Offset     INT          = 0,                           @PageSize   INT          = 10,                           @Sorting    NVARCHAR(20) = &apos;ID DESC&apos;,                           @TotalCount INT OUTPUTAS  BEGIN    SET NOCOUNT ON;    SET @Query = LTRIM(RTRIM(@Query));    SELECT @TotalCount = COUNT([Id])    FROM [dbo].[TableName]    WHERE IsDeleted = 0        AND (@Query IS NULL           OR [ColumnOne] LIKE &apos;%&apos; + @Query + &apos;%&apos;           OR [ColumnTwo] LIKE &apos;%&apos; + @Query + &apos;%&apos;);    WITH CTEResults       AS (SELECT Id,            [ColumnOne],            [ColumnTwo],            [ColumnThree],            ROW_NUMBER() OVER(            ORDER BY CASE                   WHEN(@Sorting = &apos;ID DESC&apos;)                   THEN [Id]                 END DESC,                 CASE                   WHEN(@Sorting = &apos;ID ASC&apos;)                   THEN [Id]                 END ASC,                 CASE                   WHEN(@Sorting = &apos;COLUMNONE ASC&apos;)                   THEN [ColumnOne]                 END ASC,                 CASE                   WHEN(@Sorting = &apos;COLUMNONE DESC&apos;)                   THEN [ColumnOne]                 END DESC,                 CASE                   WHEN(@Sorting = &apos;COLUMNTWO ASC&apos;)                   THEN [ColumnTwo]                 END ASC,                 CASE                   WHEN(@Sorting = &apos;COLUMNTWO DESC&apos;)                   THEN [ColumnTwo]                 END DESC) AS RowNum         FROM [dbo].[TableName]         WHERE IsDeleted = 0            AND (@Query IS NULL              OR [ColumnOne] LIKE &apos;%&apos; + @Query + &apos;%&apos;              OR [ColumnTwo] LIKE &apos;%&apos; + @Query + &apos;%&apos;);    SELECT *    FROM CTEResults    WHERE RowNum BETWEEN @Offset + 1 AND(@Offset + @PageSize);  END;GO&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above query, we are using &lt;strong&gt;CASE&lt;/strong&gt; to do the conditional sorting. And with help of a &lt;strong&gt;common table expression (CTE)&lt;/strong&gt;, we do the paging. For filtering (here only string comparison), we are using &lt;strong&gt;LIKE&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you are using SQL Server 2012 or later, then you have other options to do paging like by using &lt;strong&gt;OFFSET FETCH&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;story-in-short&quot;&gt;Story in short&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#story-in-short&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;During this post is written, I was working on an &lt;strong&gt;Angular 6 + ASP.NET Core 2.1&lt;/strong&gt; web app. The DB provided was a &lt;strong&gt;SQL Server 2008&lt;/strong&gt;. Used &lt;strong&gt;Dapper&lt;/strong&gt; to do the repository level coding.&lt;/p&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/language-elements/case-transact-sql?view=sql-server-2017&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=filtering-paging-and-sorting-in-sql-server-2008&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CASE (Transact-SQL) | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/language-elements/like-transact-sql?view=sql-server-2017&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=filtering-paging-and-sorting-in-sql-server-2008&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;LIKE (Transact-SQL) | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://technet.microsoft.com/en-us/library/gg699618(v=sql.110).aspx?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=filtering-paging-and-sorting-in-sql-server-2008&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;OFFSET FETCH Clause (SQL Server Compact)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>sql-server</category><author>Abhith Rajan</author></item><item><title>.netstandard2.0 Project - DocFX MSBuild Error</title><link>https://www.abhith.net/blog/netstandard20-project-docfx-msbuild-error/</link><guid isPermaLink="true">https://www.abhith.net/blog/netstandard20-project-docfx-msbuild-error/</guid><description>If you are facing issues when trying to generate documentation for your .netstandard2.0 project. Try the solution mentioned in this post.</description><pubDate>Tue, 20 Nov 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I tried to generate documentation for a &lt;a href=&quot;https://github.com/Abhith/Code.Library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;.netstandard2.0&lt;/a&gt; project using DocFX.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installed DocFX using chocolatey package.&lt;/li&gt;
&lt;li&gt;Created a sample project using command line.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docfx&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;init&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docfx init&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Updated the docfx.json w.r.t the folder structure.&lt;/li&gt;
&lt;li&gt;Build the website using command line.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docfx&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--serve&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docfx --serve&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The DocFX site builded but project specific documentation not generated. And there were some warnings like&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Warning:No metadata is generated for ProjectName&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;SDK “Microsoft.NET.Sdk” not found&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;solution&quot;&gt;Solution&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Set environment variable &lt;strong&gt;MSBuildSDKsPath&lt;/strong&gt; pointing right to the SDK path. In my case,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C:\Program Files\dotnet\sdk\2.1.500\Sdks&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After setting the environment variable, closed the command line (VS Code) and re opened. Tried building the DocFX again and it worked.&lt;/p&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/Abhith/Code.Library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;DocFX implementation on .netstandard2.0 project Code.Library - Refer the “docs” folder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>dotnet-core</category><category>docfx</category><category>documentation</category><author>Abhith Rajan</author></item><item><title>Docker: Cookbook</title><link>https://www.abhith.net/blog/docker-cookbook/</link><guid isPermaLink="true">https://www.abhith.net/blog/docker-cookbook/</guid><description>If you are new to docker then this post might be useful. It contains solutions to common problems, regular use case commands and some additional resources.</description><pubDate>Sun, 28 Oct 2018 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;This article is my own reference for Docker development, contains solutions for problems I have faced while working with &lt;strong&gt;Docker&lt;/strong&gt; and some helpful external resources.&lt;/p&gt;
&lt;h2 id=&quot;problems&quot;&gt;Problems&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#problems&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;1-docker-build-requires-1-argument-see-docker-build-help&quot;&gt;1. docker: “build” requires 1 argument. See ‘docker build —help’&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#1-docker-build-requires-1-argument-see-docker-build-help&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Most probably you missed a dot, need to add it, example&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-t&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;docusaurus-doc&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker build -t docusaurus-doc .&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It means you use the Dockerfile in the local directory&lt;/p&gt;
&lt;h3 id=&quot;2-read-only-file-system-error-running-docker-toolbox-in-windows-7&quot;&gt;2. “read-only file system” error running Docker Toolbox in Windows 7&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2-read-only-file-system-error-running-docker-toolbox-in-windows-7&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Try restarting the docker machine by following below steps:&lt;/p&gt;
&lt;p&gt;First, you need to find the name of your docker machine&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-machine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;ls&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-machine ls&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Then with your machine name, run the command&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-machine&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;restart&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-machine restart &lt;name&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;3-docker-for-windows---mapping-docker-to-localhost&quot;&gt;3. Docker for windows - Mapping docker to localhost&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#3-docker-for-windows---mapping-docker-to-localhost&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can do it by configuring your Virtualbox. Follow below steps,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VirtualBox -&amp;gt; Your BOX -&amp;gt; Settings -&amp;gt; Network -&amp;gt;&lt;/li&gt;
&lt;li&gt;Choose NAT&lt;/li&gt;
&lt;li&gt;Open Advanced&lt;/li&gt;
&lt;li&gt;Click Port Forwarding&lt;/li&gt;
&lt;li&gt;Add a new rule to map the desired port you need from host to guest&lt;/li&gt;
&lt;li&gt;Ok/Save&lt;/li&gt;
&lt;li&gt;Stop Box&lt;/li&gt;
&lt;li&gt;Start the Box&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;4-copy-failed-createfile&quot;&gt;4. COPY failed: CreateFile&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#4-copy-failed-createfile&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In my visual studio solution, containing a .NET Core Console app, I enabled Docker support using &lt;a href=&quot;https://docs.microsoft.com/en-us/visualstudio/containers/overview?view=vs-2019&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=docker-cookbook&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Visual studio container tools on Windows&lt;/a&gt;.&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/docker-cookbook-add-docker-support-menu.BdslPhJz_Z1NkH3T.webp&quot; alt=&quot; Visual studio container tools on Windows&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;876&quot; height=&quot;541&quot;&gt;&lt;figcaption&gt;Visual studio container tools on Windows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And it generated a &lt;strong&gt;Dockerfile&lt;/strong&gt; inside the selected project but when i tried to build an image from inside the project directory using the docker command&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-t&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;myimagename&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker build -t myimagename .&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It failed with following exception,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;COPY [“ProjectDirectory/ProjectName.csproj”, “ProjectDirectory/”]
COPY failed: CreateFile \?\C:\ProgramData\Docker\tmp\docker-builder366701720\ProjectDirectory\ProjectName.csproj: The system cannot find the path specified.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This was because I tried to run this from inside the &lt;code&gt;ProjectDirectory&lt;/code&gt;. Why I tried to run from there was because the while enabling docker support via &lt;strong&gt;Visual Studio 2019&lt;/strong&gt; context menu, the Dockerfile generated inside that project directory, not in the root directory of solution.&lt;/p&gt;
&lt;p&gt;So inorder to fix this, I moved the same Dockerfile to the root directory of the solution. It can be done via Powershell command&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;mv&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;Dockerfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;../Dockerfile&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;mv Dockerfile ../Dockerfile&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Then &lt;code&gt;cd&lt;/code&gt; into the root directory of the solution where now the Dockerfile is, and run the build command, and it worked.&lt;/p&gt;
&lt;h3 id=&quot;5-force-docker-for-a-clean-build-not-using-cache&quot;&gt;5. Force Docker for a clean build (not using cache)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#5-force-docker-for-a-clean-build-not-using-cache&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Using &lt;code&gt;--no-cache&lt;/code&gt; in your build command.&lt;/p&gt;
&lt;p&gt;eg&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--no-cache&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-t&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;myimagename&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker build --no-cache -t myimagename .&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;6-rename-a-container&quot;&gt;6. Rename a Container&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#6-rename-a-container&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Using the docker &lt;code&gt;rename&lt;/code&gt; command.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;rename&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;CONTAINER_ID&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;my_new_container_name&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker rename CONTAINER_ID my_new_container_name&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;7-r-command-not-found&quot;&gt;7. $‘\r’: command not found&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#7-r-command-not-found&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This is occurred when I tried to run some &lt;code&gt;sh&lt;/code&gt; file in my linux container. That &lt;code&gt;sh&lt;/code&gt; file was saved in &lt;strong&gt;CRLF&lt;/strong&gt; end of line sequence, changing it to &lt;strong&gt;LF&lt;/strong&gt; solved the problem.&lt;/p&gt;
&lt;p&gt;If you wonder what is &lt;strong&gt;End of line sequence&lt;/strong&gt;,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The End of Line (EOL) sequence ( 0x0D 0x0A , \r\n ) is actually two ASCII characters, a combination of the CR and LF characters. It moves the cursor both down to the next line and to the beginning of that line.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you are using &lt;strong&gt;Vscode&lt;/strong&gt;, switching &lt;strong&gt;EOL&lt;/strong&gt; is easy, on the bottom right corner, you can find the current EOL sequence of the editing file, by clicking on it, Vscode will present you a dropdown to choose from. Select the &lt;strong&gt;LF&lt;/strong&gt; in this case, and save file.&lt;/p&gt;
&lt;h3 id=&quot;8-copy-docker-image-from-one-host-another&quot;&gt;8. Copy docker image from one host another&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#8-copy-docker-image-from-one-host-another&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;By using &lt;code&gt;docker save&lt;/code&gt; command, we can export docker image as a &lt;code&gt;.tar&lt;/code&gt; file.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;save&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-o&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;/path/image_name.tar&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;image_name&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker save -o /path/image_name.tar image_name&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The above will create an image_name.tar file in the path specified. Copy it to the new host, then you can import the image to the new host by using &lt;code&gt;docker load&lt;/code&gt; like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;load&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;-i&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;lt;path&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;to&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;image&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;tar&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;file&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker load -i &lt;path to image tar file&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;9-dotnet-core-build-error-when-building-docker-image---missing-newtonsoftjson&quot;&gt;9. Dotnet core build error when building docker image - Missing Newtonsoft.Json&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#9-dotnet-core-build-error-when-building-docker-image---missing-newtonsoftjson&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In my case, When used &lt;code&gt;JsonProperty&lt;/code&gt; in a class,&lt;/p&gt;
&lt;p&gt;Visual Studio intellicode auto-filled,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Newtonsoft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Json&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;using Newtonsoft.Json;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Then during &lt;code&gt;docker build&lt;/code&gt;,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;warning MSB3245: Could not resolve this reference. Could not locate the assembly “Newtonsoft.Json”. Check to make sure the assembly exists on disk.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When I checked, found out that the Visual Studio added an &lt;strong&gt;Assembly Reference&lt;/strong&gt; to &lt;code&gt;Newtonsoft.Json&lt;/code&gt; (you can find this by expanding &lt;strong&gt;Dependencies&lt;/strong&gt; node in the solution explorer in Visual Studio). And I was using Linux images.&lt;/p&gt;
&lt;p&gt;So in order to solve this, I removed the &lt;strong&gt;Assembly Reference&lt;/strong&gt;, and added nuget package &lt;code&gt;Newtonsoft.Json&lt;/code&gt;, then the &lt;code&gt;docker build&lt;/code&gt; was successful.&lt;/p&gt;
&lt;h2 id=&quot;questions&quot;&gt;Questions&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#questions&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;1-difference-between-docker-run-and-start&quot;&gt;1. Difference between docker &lt;code&gt;run&lt;/code&gt; and &lt;code&gt;start&lt;/code&gt;&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#1-difference-between-docker-run-and-start&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In short,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;run : runs an image. i.e it will create a container from that image first and then starts the container. All in one command.&lt;/li&gt;
&lt;li&gt;start : starts the specified container.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So if you created a container from an image using the &lt;code&gt;create&lt;/code&gt; command, then you can use &lt;code&gt;start&lt;/code&gt; command to start that container. Or you can start a container from the image by using the &lt;code&gt;run&lt;/code&gt; command.&lt;/p&gt;
&lt;h3 id=&quot;2-how-to-change-the-default-docker-image-name-using-vs2019&quot;&gt;2. How to change the default docker image name using VS2019&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2-how-to-change-the-default-docker-image-name-using-vs2019&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;By adding &lt;code&gt;&amp;lt;DockerfileTag/&amp;gt;&lt;/code&gt; to project property group like given below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PropertyGroup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;TargetFramework&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;netcoreapp3.1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;TargetFramework&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;DockerDefaultTargetOS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Linux&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;DockerDefaultTargetOS&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;DockerfileTag&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;custom.image.name.here&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;DockerfileTag&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;PropertyGroup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;  &lt;PropertyGroup&gt;    &lt;TargetFramework&gt;netcoreapp3.1&lt;/TargetFramework&gt;    ...    &lt;DockerDefaultTargetOS&gt;Linux&lt;/DockerDefaultTargetOS&gt;    &lt;DockerfileTag&gt;custom.image.name.here&lt;/DockerfileTag&gt;  &lt;/PropertyGroup&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;cli&quot;&gt;CLI&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cli&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;docker-compose&quot;&gt;docker-compose&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#docker-compose&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;build-the-images-do-not-start-the-containers&quot;&gt;Build the images, do not start the containers&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build-the-images-do-not-start-the-containers&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-compose&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-compose build&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;build-the-images-if-the-images-do-not-exist-and-start-the-containers&quot;&gt;Build the images if the images do not exist and start the containers&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build-the-images-if-the-images-do-not-exist-and-start-the-containers&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-compose&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;up&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-compose up&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;force-docker-compose-to-build-from-scratch-no-cache&quot;&gt;Force &lt;code&gt;docker-compose&lt;/code&gt; to build from scratch, no cache&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#force-docker-compose-to-build-from-scratch-no-cache&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-compose&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--no-cache&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-compose build --no-cache&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;force-to-build-the-images-even-when-not-needed&quot;&gt;Force to build the images even when not needed&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#force-to-build-the-images-even-when-not-needed&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-compose&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;up&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--build&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-compose up --build&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;run-multiple-containers-of-the-same-image&quot;&gt;Run multiple containers of the same image&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#run-multiple-containers-of-the-same-image&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-compose&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;up&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;--scale&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;lt;SERVICE_NAME&amp;gt;=n&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-compose up --scale &lt;SERVICE_NAME&gt;=n&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace the &lt;code&gt;&amp;lt;SERVICE_NAME&amp;gt;&lt;/code&gt; with the appropriate service listed in the &lt;strong&gt;docker-compose.yml&lt;/strong&gt; and &lt;code&gt;n&lt;/code&gt; with the number of containers you want, in order to create that number of containers of that service.&lt;/p&gt;
&lt;h4 id=&quot;build-single-container-using-docker-compose&quot;&gt;Build single container using docker-compose&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build-single-container-using-docker-compose&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;docker-compose&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;lt;SERVICE_NAME&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;docker-compose build &lt;SERVICE_NAME&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace the &lt;code&gt;&amp;lt;SERVICE_NAME&amp;gt;&lt;/code&gt; with the appropriate service listed in the &lt;strong&gt;docker-compose.yml&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;external-resources&quot;&gt;External Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#external-resources&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://jack-vanlightly.com/blog/2017/9/24/how-to-connect-to-your-local-sql-server-from-inside-docker?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=docker-cookbook&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;How to Connect to Your Local SQL Server From Inside Docker — Jack Vanlightly&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2020-06-10&quot;&gt;2020-06-10&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-06-10&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added solution for “How to change the default docker image name using VS2019”&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>docker</category><category>cookbook</category><author>Abhith Rajan</author></item><item><title>Pad a number with leading zeros in SQL to make uniform char length</title><link>https://www.abhith.net/blog/pad-a-number-with-leading-zeros-in-sql-to-make-uniform-char-length/</link><guid isPermaLink="true">https://www.abhith.net/blog/pad-a-number-with-leading-zeros-in-sql-to-make-uniform-char-length/</guid><description>When you are in need of transforming a number to have some character to be prefixed in order to make the chars in the number a specific number long, here is one way to do it.</description><pubDate>Mon, 01 Oct 2018 18:43:00 GMT</pubDate><content:encoded>&lt;p&gt;When you are in need of transforming a number to have zeros prefixed, use the below query.
In order to prefix with zeros, we need to convert the number to a varchar.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SELECT REPLACE(STR(n,x),’ ’,‘y’)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;STR&lt;/strong&gt; function in &lt;strong&gt;SQL&lt;/strong&gt; returns character data converted from numeric data. In the query, ‘n’ is the number to be transformed. ‘x’ is the number of chars to be returned and ‘y’ is the character to be prefixed with the number ‘n’ in order to make the specified length ‘x’.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;eg. SELECT REPLACE(STR(9,5),’ ’,‘0’) will return “00009”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql?view=sql-server-2017&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=pad-a-number-with-leading-zeros-in-sql-to-make-uniform-char-length&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;STR (Transact-SQL) | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>sql-server</category><author>Abhith Rajan</author></item><item><title>The Best Extensions for Visual Studio 2010</title><link>https://www.abhith.net/blog/the-best-extensions-for-visual-studio-2010/</link><guid isPermaLink="true">https://www.abhith.net/blog/the-best-extensions-for-visual-studio-2010/</guid><description>List of extensions which improves default experience of Visual Studio 2010</description><pubDate>Sun, 30 Sep 2018 19:17:00 GMT</pubDate><content:encoded>&lt;p&gt;You may think why such a post in 2018. This is because I recently moved to another firm where I have to support some legacy apps.
Few of them are built using &lt;strong&gt;Visual Studio 2010&lt;/strong&gt; and they have no plan to upgrade so far. After working so long in VS2017 with ReSharper and all, working with VS2010 is not so pleasant. But in order to improve the default experience VS2010 offering, following extensions helped me so far.&lt;/p&gt;
&lt;h3 id=&quot;i-hate-regions&quot;&gt;I Hate #Regions&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#i-hate-regions&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Shanewho.IHateRegions&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/Shanewho.IHateRegions.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Shanewho.IHateRegions&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/Shanewho.IHateRegions.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Shanewho.IHateRegions&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/Shanewho.IHateRegions.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regions Suck. You need &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Shanewho.IHateRegions&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;devcolor&quot;&gt;devColor&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#devcolor&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Mario185.devColor&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/Mario185.devColor.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Mario185.devColor&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/Mario185.devColor.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Mario185.devColor&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/Mario185.devColor.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Mario185.devColor&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;devColor&lt;/a&gt; underlines the colors in stylesheets and contains a color picker.&lt;/p&gt;
&lt;h3 id=&quot;brace-completer&quot;&gt;Brace Completer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#brace-completer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=JoelSpadin.BraceCompleter&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/JoelSpadin.BraceCompleter.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=JoelSpadin.BraceCompleter&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/JoelSpadin.BraceCompleter.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=JoelSpadin.BraceCompleter&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/JoelSpadin.BraceCompleter.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=JoelSpadin.BraceCompleter&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Brace Completer&lt;/a&gt; automatically adds closing braces after typing an opening brace and pressing Enter.&lt;/p&gt;
&lt;h3 id=&quot;highlight-all-occurrences-of-selected-word&quot;&gt;Highlight all occurrences of selected word&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#highlight-all-occurrences-of-selected-word&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NicholasSha.Highlightalloccurrencesofselectedword&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/NicholasSha.Highlightalloccurrencesofselectedword.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NicholasSha.Highlightalloccurrencesofselectedword&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/NicholasSha.Highlightalloccurrencesofselectedword.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NicholasSha.Highlightalloccurrencesofselectedword&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/NicholasSha.Highlightalloccurrencesofselectedword.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NicholasSha.Highlightalloccurrencesofselectedword&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Highlight all occurrences of selected word&lt;/a&gt; extends the editor to highlight all occurrences of a selected word and place a glyph on the left margin.&lt;/p&gt;
&lt;h3 id=&quot;go-to-definition&quot;&gt;Go To Definition&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#go-to-definition&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NoahRichards.GoToDefinition&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/NoahRichards.GoToDefinition.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NoahRichards.GoToDefinition&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/NoahRichards.GoToDefinition.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NoahRichards.GoToDefinition&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/NoahRichards.GoToDefinition.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=NoahRichards.GoToDefinition&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Go To Definition&lt;/a&gt; make ctrl+click perform a “Go To Definition” on the identifier under the cursor. Also, when the ctrl key is held down, highlight identifiers that look like they have definitions to navigate to.&lt;/p&gt;
&lt;h3 id=&quot;productivity-power-tools&quot;&gt;Productivity Power Tools&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#productivity-power-tools&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerTools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/VisualStudioPlatformTeam.ProductivityPowerTools.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerTools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/VisualStudioPlatformTeam.ProductivityPowerTools.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerTools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/VisualStudioPlatformTeam.ProductivityPowerTools.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerTools&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Productivity Power Tools&lt;/a&gt; is a set of extensions to Visual Studio Professional (and above) which improves developer productivity.&lt;/p&gt;
&lt;h3 id=&quot;allmargins-2012&quot;&gt;AllMargins 2012&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#allmargins-2012&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=fourpastmidnight.AllMargins2012&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/version-short/fourpastmidnight.AllMargins2012.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=fourpastmidnight.AllMargins2012&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/installs-short/fourpastmidnight.AllMargins2012.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;
&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=fourpastmidnight.AllMargins2012&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://vsmarketplacebadge.apphb.com/rating-short/fourpastmidnight.AllMargins2012.svg&quot; alt=&quot;BuildVision&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=fourpastmidnight.AllMargins2012&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;AllMargins 2012&lt;/a&gt; extension contains the OverviewMargin and several other extensions of that margin.&lt;/p&gt;
&lt;h3 id=&quot;dpack&quot;&gt;DPack&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dpack&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://www.usysware.com/dpack/Default.aspx?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=the-best-extensions-for-visual-studio-2010&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;DPack&lt;/a&gt; is a FREE collection of Microsoft Visual Studio tools. DPack is designed to greatly increase developer’s productivity, automate repetitive processes and expand upon some of Microsoft Visual Studio features.&lt;/p&gt;</content:encoded><category>visual-studio</category><category>ide</category><category>awesome-list</category><author>Abhith Rajan</author></item><item><title>ASP.NET Core - Starting the web server is taking longer than expected</title><link>https://www.abhith.net/blog/asp-net-core-starting-the-web-server-is-taking-longer-than-expected/</link><guid isPermaLink="true">https://www.abhith.net/blog/asp-net-core-starting-the-web-server-is-taking-longer-than-expected/</guid><description>If you are staring on a Visual Studio message saying &quot;Starting the web server is taking longer than expected&quot;, this article might help you.</description><pubDate>Sun, 13 May 2018 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;One of our recent projects is on ASP.NET Core, and we are using &lt;a href=&quot;https://www.aspnetboilerplate.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=asp-net-core-starting-the-web-server-is-taking-longer-than-expected&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;aspnetboilerplate&lt;/a&gt; ASP.NET Core 2.x + Angular free (and one of the best) boilerplate for the same. One of the requirement is to have the social login. ABP free template doesn’t have built-in social login feature like ABP ZERO paid template, but we can integrate it after spending few hours on google.&lt;/p&gt;
&lt;p&gt;In order to test the social login, like facebook, we need to have https (even for localhost). So I updated the Host project settings to use https. After making the site https (localhost), when I debug, there comes the message window, saying&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Starting the web server is taking longer than expected&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I spend some time staring the screen but nothing happened, a little google for the same pointed that it was because of the new localhost SSL related. I did accepted the certificate while project settings updated but somehow this issue. To solve it,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Browse the https website from IISExpress in the taskbar icon tray.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That will open the website and the rest was fine and never faced the problem again.&lt;/p&gt;</content:encoded><category>aspnet-core</category><author>Abhith Rajan</author></item><item><title>Flutter Cookbook</title><link>https://www.abhith.net/blog/flutter-cookbook/</link><guid isPermaLink="true">https://www.abhith.net/blog/flutter-cookbook/</guid><description>This cookbook will help you solve common problems while writing Flutter apps.</description><pubDate>Mon, 30 Apr 2018 19:22:00 GMT</pubDate><content:encoded>&lt;p&gt;Most of the solution implementations mentioned below can be found in my repo &lt;a href=&quot;https://github.com/Abhith/piggy-flutter&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;https://github.com/Abhith/piggy-flutter&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;navigation&quot;&gt;Navigation&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#navigation&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;move-to-a-new-screen-without-back&quot;&gt;Move to a new screen without back&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#move-to-a-new-screen-without-back&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;An example of this use case is the login page. When a user successfully logged in, we redirect the user to another page, and in most case, we don’t want a back button to go back to the login page. This can be easily done using &lt;strong&gt;Navigator.pushReplacement&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;dart&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;Navigator&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;pushReplacement&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;context,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;MaterialPageRoute&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(builder&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (context) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#5B6900&quot;&gt;HomePage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;()),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;    Navigator.pushReplacement(            context,            MaterialPageRoute(builder: (context) =&gt; HomePage()),    );&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;state-management&quot;&gt;State Management&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#state-management&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;bloc&quot;&gt;Bloc&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bloc&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;As a rookie in the flutter, one of the biggest challenges I faced was state management. Started with StatefulWidget’s setState, but sooner understood that it is not enough (state persistence was the tough part). After a long search, found that there are many ways to do it in flutter including Redux, Scoped Model, BLoC etc. I don’t like Redux too much, I tried it for React Native app earlier and moved to &lt;strong&gt;mobx-state-tree&lt;/strong&gt; instead.&lt;/p&gt;
&lt;p&gt;One I got excited about was Streams and BLoC (business logic components). But first found tutorials was not enough and heavily confusing (for a rookie). But tried them one by one and my solutions get better after each commit.&lt;/p&gt;
&lt;p&gt;Now in my view, the best way to do it is by using the &lt;a href=&quot;https://github.com/felangel/bloc/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=flutter-cookbook&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;bloc package&lt;/a&gt; and the best part of it is, this one is very well &lt;a href=&quot;https://bloclibrary.dev/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=flutter-cookbook#/&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;documented&lt;/a&gt; with example applications. It also has an extension for VSCODE to ease the usage.&lt;/p&gt;
&lt;h3 id=&quot;build&quot;&gt;Build&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;build-failed---null-value-in-entry-outputfilenull&quot;&gt;Build failed - null value in entry: outputFile=null&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#build-failed---null-value-in-entry-outputfilenull&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Recently my machine shutdown unexpectedly during a build in progress. After that, all the build is failing with this error.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Removing the .gradle directory in the root project directory will fix the problem.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;error-importing-packagehttphttpdart&quot;&gt;Error importing package:http/http.dart&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#error-importing-packagehttphttpdart&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;After long time, when I tried to build, I got this error. To resolve,&lt;/p&gt;
&lt;p&gt;Go to your &lt;strong&gt;pubspec.yaml&lt;/strong&gt; file , and add the &lt;code&gt;http&lt;/code&gt; dependency:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;flutter&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;sdk&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;flutter&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;cupertino_icons&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;^0.1.2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;any&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;dependencies:  flutter:    sdk: flutter  cupertino_icons: ^0.1.2  http: any&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Then run the following,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;flutter&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;packages&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;get&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;flutter packages get&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If you are using &lt;strong&gt;VS Code&lt;/strong&gt; as the IDE, the above will be automatically executed once you save the &lt;strong&gt;pubspec.yaml&lt;/strong&gt; file. (If you installed the &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=flutter-cookbook&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Flutter&lt;/a&gt; extension for VS Code).&lt;/p&gt;
&lt;h4 id=&quot;socketexception-os-error-connection-refused-errno--111-when-trying-to-connect-to-localhost&quot;&gt;SocketException: OS Error: Connection refused, errno = 111 when trying to connect to localhost&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#socketexception-os-error-connection-refused-errno--111-when-trying-to-connect-to-localhost&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;My ASPNET Core API’s where running on localhost and I was trying to request against the same using the Android emulator, then your server endpoint should be &lt;strong&gt;10.0.2.2:PORT_NUMBER&lt;/strong&gt; instead of &lt;strong&gt;localhost:PORT_NUMBER&lt;/strong&gt; as AVD uses 10.0.2.2 as an alias to your host loopback interface (i.e) localhost.&lt;/p&gt;
&lt;h4 id=&quot;more-than-one-file-was-found-with-os-independent-path-meta-infproguardandroidx-annotationspro&quot;&gt;More than one file was found with OS independent path ‘META-INF/proguard/androidx-annotations.pro’&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#more-than-one-file-was-found-with-os-independent-path-meta-infproguardandroidx-annotationspro&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Adding following in the &lt;code&gt;android &amp;gt; app &amp;gt; build.gradle&lt;/code&gt; fixed the build error,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;java&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;android {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;packagingOptions {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;exclude &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;META-INF/proguard/androidx-annotations.pro&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;android {     packagingOptions {         exclude &apos;META-INF/proguard/androidx-annotations.pro&apos;     } }&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;disable-null-safety-check&quot;&gt;Disable Null Safety Check&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#disable-null-safety-check&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Include a version prior to 2.12 in the &lt;code&gt;pubspec.yaml&lt;/code&gt; file to disable null safety.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;environment&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;sdk&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&amp;gt;=2.11.0 &amp;lt;3.0.0&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;environment:  sdk: &amp;quot;&gt;=2.11.0 &lt;3.0.0&amp;quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;changelog&quot;&gt;Changelog&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#changelog&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;2022-03-09&quot;&gt;2022-03-09&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2022-03-09&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added solution for “Disable Null Safety Check”&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2020-03-11&quot;&gt;2020-03-11&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2020-03-11&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added solution for “More than one file was found with OS independent path ‘META-INF/proguard/androidx-annotations.pro’&amp;quot;&amp;quot;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>flutter</category><category>cookbook</category><category>dart</category><author>Abhith Rajan</author></item><item><title>React Native - Build APK</title><link>https://www.abhith.net/blog/react-native-build-apk/</link><guid isPermaLink="true">https://www.abhith.net/blog/react-native-build-apk/</guid><description>You can build APK (debug) from your react native project by using three commands.</description><pubDate>Tue, 24 Apr 2018 19:34:00 GMT</pubDate><content:encoded>&lt;h4 id=&quot;first&quot;&gt;First&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#first&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;react-native bundle —dev false —platform android —entry-file index.js —bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle —assets-dest ./android/app/build/intermediates/res/merged/debug&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;second&quot;&gt;Second&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#second&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;cd android&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;final&quot;&gt;Final&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#final&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;./gradlew assembleDebug&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once all three commands executed successfully. You can find the generated APK on&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Project root directory &amp;gt; android &amp;gt; app &amp;gt; build &amp;gt; outputs &amp;gt; apk &amp;gt; app-debug.apk&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As the name suggests, this is not a release version. But still, you can share it with testers. I use &lt;a href=&quot;http://hockeyapp.net/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=react-native-build-apk&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;hockeyapp&lt;/a&gt; to do the distribution.&lt;/p&gt;</content:encoded><category>react-native</category><author>Abhith Rajan</author></item><item><title>IIS - OPTIONS Requests Returns 404</title><link>https://www.abhith.net/blog/iis-options-requests-returns-404/</link><guid isPermaLink="true">https://www.abhith.net/blog/iis-options-requests-returns-404/</guid><description>If OPTIONS preflight request getting 404 and URLScan enabled on your hosting machine, check out this article.</description><pubDate>Thu, 19 Apr 2018 19:29:00 GMT</pubDate><content:encoded>&lt;p&gt;The best way to figure out what is happening is to check the IIS logs. That should be the first thing to do in a similar situation. If you notice something like “Rejected-By-UrlScan”, you need to check the URLScan configurations located in&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Windows drive (C: most probably) &amp;gt; Windows &amp;gt; system32 &amp;gt; inetsrv &amp;gt; urlscan &amp;gt; UrlScan.ini&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Open the above file in a text editor and look for &lt;strong&gt;[AllowVerbs]&lt;/strong&gt; section. If &lt;strong&gt;OPTIONS&lt;/strong&gt; not specified in the &lt;strong&gt;[AllowVerbs]&lt;/strong&gt; section along with others (GET, POST etc), add &lt;strong&gt;OPTIONS&lt;/strong&gt;. To do that, you may need to open the file in a text editor with &lt;strong&gt;administrative&lt;/strong&gt; privileges and save. That’s it.&lt;/p&gt;
&lt;h3 id=&quot;story-behind&quot;&gt;Story Behind&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#story-behind&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Recently we installed URLScan on our front-end servers for one of SharePoint project in order to redirect 404 URL’s to the relevant pages, to improve the SEO. But after the deployment, another Web API project hosted in the same machines failed to serve OPTIONS request.&lt;/p&gt;
&lt;p&gt;When checked the browser console errors, we thought of CORS issue and tried custom header appending etc in the web.config but nothing worked out, and later we find out the issue with URLScan. When we checked the URLScan configuration, by default only GET, PUT and POST are included in the [AllowVerbs] section. So our OPTIONS request where not even reached our website and being rejected by the URLScan module. Once we added OPTIONS in the [AllowVerbs] section, everything resumes working fine.&lt;/p&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.pressthered.com/rejected-by-urlscan_404_errors/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=iis-options-requests-returns-404&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Rejected-By-UrlScan 404 Errors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>iis</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>.NET Interview Questions and Answers</title><link>https://www.abhith.net/blog/dot-net-interview-questions-and-answers/</link><guid isPermaLink="true">https://www.abhith.net/blog/dot-net-interview-questions-and-answers/</guid><description>Here I am listing some of the interview questions I have faced when applied for .NET developer/Software engineer roles.</description><pubDate>Thu, 12 Apr 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Following are some of the questions which I faced during interviews (don’t remember all of them).&lt;/p&gt;
&lt;h3 id=&quot;general&quot;&gt;General&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#general&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#self-introduction&quot;&gt;Self-introduction (*)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;knowledge&quot;&gt;Knowledge&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#knowledge&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#difference-between-wcf-and-web-api&quot;&gt;Difference between WCF and Web API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#delegates&quot;&gt;Delegates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#aspnet-page-life-cycle&quot;&gt;ASP.NET Page Life Cycle (5)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#session-state-modes&quot;&gt;Session-State Modes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#how-to-find-out-whether-it-is-a-post-back-in-the-web-form&quot;&gt;How to find out whether it is a post back in the web form&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;other&quot;&gt;Other&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#other&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IIS version you are using&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;practical-level&quot;&gt;Practical Level&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#practical-level&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#query-the-second-most-salary-from-a-table-of-salaries-using-sql&quot;&gt;Query the second most salary from a table of salaries using SQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Write a simple Angular 5 app which list data from a REST API. Include some action on the list like delete row.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Noticed the count/* beside some questions?
It indicates that the question was asked on multiple occasions.&lt;/p&gt;
&lt;h3 id=&quot;-self-introduction&quot;&gt;&lt;a name=&quot;self-introduction&quot;&gt;&lt;/a&gt; Self-introduction&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-self-introduction&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;No matter what kind of interview you are going to attend, prepare for this question.&lt;/p&gt;
&lt;h3 id=&quot;-difference-between-wcf-and-web-api&quot;&gt;&lt;a name=&quot;difference-between-wcf-and-web-api&quot;&gt;&lt;/a&gt; Difference between WCF and Web API&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-difference-between-wcf-and-web-api&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;WCF enables building services that support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them.&lt;/li&gt;
&lt;li&gt;Web API is HTTP only. The first-class programming model for HTTP. More suitable for access from various browsers, mobile devices etc enabling wide reach.&lt;/li&gt;
&lt;li&gt;WCF enables building services that support multiple encodings (Text, MTOM, and Binary) of the same message type and allows switching between them.&lt;/li&gt;
&lt;li&gt;Web API supports a wide variety of media types including XML, JSON etc.&lt;/li&gt;
&lt;li&gt;WCF supports building services with WS-* standards like Reliable Messaging, Transactions, Message Security.&lt;/li&gt;
&lt;li&gt;Web API uses basic protocol and formats such as HTTP, WebSockets, SSL, JSON, and XML. There is no support for higher level protocols such as Reliable Messaging or Transactions.&lt;/li&gt;
&lt;li&gt;WCF supports Request-Reply, One Way, and Duplex message exchange patterns.&lt;/li&gt;
&lt;li&gt;HTTP is request/response but additional patterns can be supported through SignalR and WebSockets integration with Web API.&lt;/li&gt;
&lt;li&gt;WCF SOAP services can be described in WSDL allowing automated tools to generate client proxies even for services with complex schemas.&lt;/li&gt;
&lt;li&gt;There is a variety of ways to describe a Web API ranging from auto-generated HTML help page (eg. Swagger) describing snippets to structured metadata for OData integrated APIs.&lt;/li&gt;
&lt;li&gt;WCF ships with the .NET framework.&lt;/li&gt;
&lt;li&gt;Web API ships with the .NET framework but is open-source and is also available out-of-band as an independent download.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/framework/wcf/wcf-and-aspnet-web-api?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;WCF and ASP.NET Web API | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-delegates&quot;&gt;&lt;a name=&quot;delegates&quot;&gt;&lt;/a&gt; Delegates&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-delegates&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A delegate is a type that represents references to methods with a particular parameter list and return type.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Delegates allow methods to be passed as parameters.&lt;/li&gt;
&lt;li&gt;Delegates can be used to define callback methods.&lt;/li&gt;
&lt;li&gt;Delegates can be chained together.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;additional-resources-1&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-1&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/delegates/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Delegates (C# Programming Guide) | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-aspnet-page-life-cycle&quot;&gt;&lt;a name=&quot;aspnet-page-life-cycle&quot;&gt;&lt;/a&gt; ASP.NET Page Life Cycle&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-aspnet-page-life-cycle&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering. It is important for you to understand the page life cycle so that you can write code at the appropriate life-cycle stage for the effect you intend.&lt;/p&gt;
&lt;h4 id=&quot;general-page-life-cycle-stages&quot;&gt;General Page Life-Cycle Stages&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#general-page-life-cycle-stages&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In general terms, the page goes through the stages outlined in the following table.&lt;/p&gt;





































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stage&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Page request&lt;/td&gt;&lt;td&gt;The page request occurs before the page life cycle begins. When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Start&lt;/td&gt;&lt;td&gt;In the start stage, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. The page also sets the UICulture property.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Initialization&lt;/td&gt;&lt;td&gt;During page initialization, controls on the page are available and each control’s UniqueID property is set. A master page and themes are also applied to the page if applicable. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Load&lt;/td&gt;&lt;td&gt;During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Postback event handling&lt;/td&gt;&lt;td&gt;If the request is a postback, control event handlers are called. After that, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page. (There is an exception to this sequence: the handler for the event that caused validation is called after validation.)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rendering&lt;/td&gt;&lt;td&gt;Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page’s Response property.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Unload&lt;/td&gt;&lt;td&gt;The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and cleanup is performed.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h4 id=&quot;life-cycle-events&quot;&gt;Life-Cycle Events&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#life-cycle-events&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Within each stage of the life cycle of a page, the page raises events that you can handle to run your own code.&lt;/p&gt;

























































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Page Event&lt;/th&gt;&lt;th&gt;Typical Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;PreInit&lt;/td&gt;&lt;td&gt;Raised after the start stage is complete and before the initialization stage begins. Use this event for Checking the IsPostBack property to determine whether this is the first time the page is being processed, The IsCallback and IsCrossPagePostBack properties have also been set at this time, Create or re-create dynamic controls, Set a master page dynamically, Set the Theme property dynamically and Read or set profile property values.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Init&lt;/td&gt;&lt;td&gt;Raised after all controls have been initialized and any skin settings have been applied. The Init event of individual controls occurs before the Init event of the page. Use this event to read or initialize control properties.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;InitComplete&lt;/td&gt;&lt;td&gt;Raised at the end of the page’s initialization stage. Only one operation takes place between the Init and InitComplete events: tracking of view state changes is turned on. View state tracking enables controls to persist any values that are programmatically added to the ViewState collection. Until view state tracking is turned on, any values added to view state are lost across postbacks. Controls typically turn on view state tracking immediately after they raise their Init event. Use this event to make changes to view state that you want to make sure are persisted after the next postback.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PreLoad&lt;/td&gt;&lt;td&gt;Raised after the page loads view state for itself and all controls, and after it processes postback data that is included with the Request instance.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Load&lt;/td&gt;&lt;td&gt;The Page object calls the OnLoad method on the Page object, and then recursively does the same for each child control until the page and all controls are loaded. The Load event of individual controls occurs after the Load event of the page. Use the OnLoad event method to set properties in controls and to establish database connections.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Control events&lt;/td&gt;&lt;td&gt;Use these events to handle specific control events, such as a Button control’s Click event or a TextBox control’s TextChanged event.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LoadComplete&lt;/td&gt;&lt;td&gt;Raised at the end of the event-handling stage. Use this event for tasks that require that all other controls on the page be loaded.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PreRender&lt;/td&gt;&lt;td&gt;Raised after the Page object has created all controls that are required in order to render the page, including child controls of composite controls. (To do this, the Page object calls EnsureChildControls for each control and for the page.) The Page object raises the PreRender event on the Page object, and then recursively does the same for each child control. The PreRender event of individual controls occurs after the PreRender event of the page. Use the event to make final changes to the contents of the page or its controls before the rendering stage begins.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PreRenderComplete&lt;/td&gt;&lt;td&gt;Raised after each data bound control whose DataSourceID property is set calls its DataBind method. For more information, see Data Binding Events for Data-Bound Controls later in this topic.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SaveStateComplete&lt;/td&gt;&lt;td&gt;Raised after view state and control state have been saved for the page and for all controls. Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Render&lt;/td&gt;&lt;td&gt;This is not an event; instead, at this stage of processing, the Page object calls this method on each control. All ASP.NET Web server controls have a Render method that writes out the control’s markup to send to the browser. If you create a custom control, you typically override this method to output the control’s markup. However, if your custom control incorporates only standard ASP.NET Web server controls and no custom markup, you do not need to override the Render method. For more information, see Developing Custom ASP.NET Server Controls. A user control (an .ascx file) automatically incorporates rendering, so you do not need to explicitly render the control in code.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Unload&lt;/td&gt;&lt;td&gt;Raised for each control and then for the page. In controls, use this event to do final cleanup for specific controls, such as closing control-specific database connections. For the page itself, use this event to do final cleanup work, such as closing open files and database connections, or finishing up logging or other request-specific tasks.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h4 id=&quot;additional-resources-2&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-2&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/ms178472.aspx?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ASP.NET Page Life Cycle Overview | MSDN&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-session-state-modes&quot;&gt;&lt;a name=&quot;session-state-modes&quot;&gt;&lt;/a&gt; Session-State Modes&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-session-state-modes&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;ASP.NET session state supports several different storage options for session data.&lt;/p&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mode&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;InProc&lt;/td&gt;&lt;td&gt;which stores session state in memory on the Web server. This is the default.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;StateServer&lt;/td&gt;&lt;td&gt;which stores session state in a separate process called the ASP.NET state service. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQLServer&lt;/td&gt;&lt;td&gt;stores session state in a SQL Server database. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Custom&lt;/td&gt;&lt;td&gt;which enables you to specify a custom storage provider.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Off&lt;/td&gt;&lt;td&gt;which disables session state.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h4 id=&quot;additional-resources-3&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-3&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/ms178586.aspx?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Session-State Modes | MSDN&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-how-to-find-out-whether-it-is-a-post-back-in-the-web-form&quot;&gt;&lt;a name=&quot;how-to-find-out-whether-it-is-a-post-back-in-the-web-form&quot;&gt;&lt;/a&gt; How to find out whether it is a post back in the web form&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-how-to-find-out-whether-it-is-a-post-back-in-the-web-form&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;By checking &lt;strong&gt;Page.IsPostBack&lt;/strong&gt; Property, Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.&lt;/p&gt;
&lt;h4 id=&quot;additional-resources-4&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-4&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback(v=vs.110).aspx?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Page.IsPostBack Property | MSDN&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;-query-the-second-most-salary-from-a-table-of-salaries-using-sql&quot;&gt;&lt;a name=&quot;query-the-second-most-salary-from-a-table-of-salaries-using-sql&quot;&gt;&lt;/a&gt; Query the second most salary from a table of salaries using SQL&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#-query-the-second-most-salary-from-a-table-of-salaries-using-sql&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;SELECT TOP 1 * FROM TABLENAME WHERE SALARY &amp;lt; (SELECT MAX(SALARY) FROM TABLENAME) ORDER BY SALARY DESC&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Of course there is another better solution, which is using SQL OFFSET-FETCH clause, which is&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SELECT * FROM TABLENAME ORDER BY SALARY DESC OFFSET 1 ROWS FETCH NEXT 1 ROWS ONLY&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;questions-with-link-to-answers&quot;&gt;Questions with link to answers&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#questions-with-link-to-answers&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;sql&quot;&gt;SQL&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#sql&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.abhith.net/blog/filtering-paging-and-sorting-in-sql-server-2008/&quot;&gt;Server side paging via sql&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.dotnettricks.com/learn/sqlserver/difference-between-stored-procedure-and-function-in-sql-server?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Difference between procedure and function (SQL)&lt;/a&gt; (2)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql?view=sql-server-2017&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CTE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.w3schools.com/sql/sql_constraints.asp?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SQL Constraints&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;aspnet-mvc&quot;&gt;ASP.NET MVC&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#aspnet-mvc&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.eduonix.com/web-programming-tutorials/learn-different-types-of-action-results-in-mvc/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Types of action result in MVC&lt;/a&gt; (2)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.tutorialsteacher.com/mvc/filters-in-asp.net-mvc?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Filters in MVC&lt;/a&gt; (3)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1045316/asp-net-mvc-ambiguous-action-methods?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Can we define multiple actions with same name in a MVC controller?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dzone.com/articles/areas-in-aspnet-mvc?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Areas in MVC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.codeproject.com/Articles/1028156/%2FArticles%2F1028156%2FA-Detailed-Walkthrough-of-ASP-NET-MVC-Request-Life?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Mvc request life cycle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.linkedin.com/pulse/difference-between-viewdata-viewbag-tempdata-sunmbal-siddiqui/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Difference between TempData ViewData and ViewBag&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;other-1&quot;&gt;Other&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#other-1&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/standard/clr?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;CLR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Generics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;non-technical&quot;&gt;Non-Technical&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#non-technical&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Why leaving current organization (3)&lt;/li&gt;
&lt;li&gt;Difficult people you have been in touch with during work (Manager, Stakeholder or Colleagues) and how you dealt with them&lt;/li&gt;
&lt;li&gt;How you responded when a drastic change is requested by the client after all the work done&lt;/li&gt;
&lt;li&gt;Which project you think that doesn’t achieved its reach and why that happened&lt;/li&gt;
&lt;li&gt;Explain entire lifecycle of a project that you handle (2)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;umbraco&quot;&gt;Umbraco&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#umbraco&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Did your Umbraco sites backoffice is publicly accessible?&lt;/li&gt;
&lt;li&gt;Archetype&lt;/li&gt;
&lt;li&gt;What is the alternative for Archetype ?&lt;/li&gt;
&lt;li&gt;Packages you have worked with&lt;/li&gt;
&lt;li&gt;Custom Data Type&lt;/li&gt;
&lt;li&gt;How to show custom error for media upload if file size exceeds the limit ?&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;Experience with Umbraco Forms&lt;/li&gt;
&lt;li&gt;Difference between surface controller and a normal mvc controller?&lt;/li&gt;
&lt;li&gt;API Controller&lt;/li&gt;
&lt;li&gt;Built authorized pages?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;net&quot;&gt;.NET&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#net&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/boxing-and-unboxing?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Boxing and Unboxing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.guru99.com/c-sharp-serialization.html?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=dot-net-interview-questions-and-answers&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Serialization &amp;amp; Deserialization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;by reference vs. by value&lt;/li&gt;
&lt;li&gt;C# supports multi-inheritance?&lt;/li&gt;
&lt;li&gt;How to stop inheritance?&lt;/li&gt;
&lt;li&gt;For Ajax calls, what is the lifecycle of a WebForm&lt;/li&gt;
&lt;li&gt;Can we return view from Web api? - NO&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;javascript&quot;&gt;JavaScript&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#javascript&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;getElementsByName, getElementById&lt;/li&gt;
&lt;li&gt;Cloning&lt;/li&gt;
&lt;li&gt;by reference vs. by value&lt;/li&gt;
&lt;li&gt;How can we access a WCF&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;angularjs&quot;&gt;AngularJS&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#angularjs&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Modules (2)&lt;/li&gt;
&lt;li&gt;Controllers&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;angular&quot;&gt;Angular&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#angular&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Why chosen Angular over ReactJS&lt;/li&gt;
&lt;li&gt;What is Polyfills.js&lt;/li&gt;
&lt;li&gt;Pure/Impure Pipes&lt;/li&gt;
&lt;li&gt;ViewChild&lt;/li&gt;
&lt;li&gt;Template driven forms&lt;/li&gt;
&lt;li&gt;NgOnChanges, NgDirty&lt;/li&gt;
&lt;li&gt;What is @Input and @Output&lt;/li&gt;
&lt;li&gt;How to deploy Angular project and what is dist folder&lt;/li&gt;
&lt;li&gt;How Angular works in browser&lt;/li&gt;
&lt;li&gt;What is AOT&lt;/li&gt;
&lt;li&gt;How to write Custom Pipes and how will name&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;xamarin&quot;&gt;Xamarin&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#xamarin&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;How to reduce apk size&lt;/li&gt;
&lt;li&gt;Why using Xamarin forms over native application?&lt;/li&gt;
&lt;li&gt;Architecture of xamarin forms project&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;drafts&quot;&gt;Drafts&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#drafts&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Server side paging via entity framework&lt;/li&gt;
&lt;li&gt;Entity framework approaches&lt;/li&gt;
&lt;li&gt;Entity framework versions you have worked with?&lt;/li&gt;
&lt;li&gt;PCL&lt;/li&gt;
&lt;li&gt;How PCL compiled&lt;/li&gt;
&lt;li&gt;Difference between PCL and shared projects (Xamarin)&lt;/li&gt;
&lt;li&gt;What is MVC&lt;/li&gt;
&lt;li&gt;How model is validated MVC?&lt;/li&gt;
&lt;li&gt;Some components annotations&lt;/li&gt;
&lt;li&gt;How to differentiate Web API controllers from MVC controllers if they have same name&lt;/li&gt;
&lt;li&gt;What can be done in wcf which cannot done in Web API?&lt;/li&gt;
&lt;li&gt;Oauth&lt;/li&gt;
&lt;li&gt;Oath flow&lt;/li&gt;
&lt;li&gt;Odata&lt;/li&gt;
&lt;li&gt;Session in MVC&lt;/li&gt;
&lt;li&gt;Bundling&lt;/li&gt;
&lt;li&gt;What’s inside app data folder&lt;/li&gt;
&lt;li&gt;Cache advantages&lt;/li&gt;
&lt;li&gt;How can we define Cache expiry&lt;/li&gt;
&lt;li&gt;How an old SQL project can be moved to entity framework in less time&lt;/li&gt;
&lt;li&gt;Mvc project architecture (2)&lt;/li&gt;
&lt;li&gt;What’s inside MVC areas folder&lt;/li&gt;
&lt;li&gt;Routing in MVC (2)&lt;/li&gt;
&lt;li&gt;Attribute routing in MVC (2)&lt;/li&gt;
&lt;li&gt;Routing priority&lt;/li&gt;
&lt;li&gt;Razor&lt;/li&gt;
&lt;li&gt;Tag helpers in MVC&lt;/li&gt;
&lt;li&gt;Tag helpers or html helpers you use and why&lt;/li&gt;
&lt;li&gt;Dependency injection&lt;/li&gt;
&lt;li&gt;CORS&lt;/li&gt;
&lt;li&gt;Advantages of Razor&lt;/li&gt;
&lt;li&gt;How to retrieve data posted in MVC controller&lt;/li&gt;
&lt;li&gt;Azure&lt;/li&gt;
&lt;li&gt;Override method in a class&lt;/li&gt;
&lt;li&gt;Worker types in azure&lt;/li&gt;
&lt;li&gt;Iaas Azure&lt;/li&gt;
&lt;li&gt;Difference between MVC 5 and 6&lt;/li&gt;
&lt;li&gt;CRUD in entity framework&lt;/li&gt;
&lt;li&gt;Redis&lt;/li&gt;
&lt;li&gt;Lazy loading in EF&lt;/li&gt;
&lt;li&gt;IEnumerable vs List&lt;/li&gt;
&lt;li&gt;Polymorphism in OOP&lt;/li&gt;
&lt;li&gt;Interface vs Abstract classes&lt;/li&gt;
&lt;li&gt;Is there abstract methods&lt;/li&gt;
&lt;li&gt;Reporting tools you have used&lt;/li&gt;
&lt;li&gt;How to reuse a certain view section in multiple places&lt;/li&gt;
&lt;li&gt;Why you choose Angular over KnockoutJs&lt;/li&gt;
&lt;li&gt;Oracle DB Experience (3)&lt;/li&gt;
&lt;li&gt;What is the purpose of Global.Ascx&lt;/li&gt;
&lt;li&gt;In Web forms, in which page lifecycle method we can toggle element visibility&lt;/li&gt;
&lt;li&gt;REST vs SOAP&lt;/li&gt;
&lt;li&gt;Mobile API security guidelines (Sensitive data handling techniques)&lt;/li&gt;
&lt;li&gt;Complex system deployment automation tools and techniques&lt;/li&gt;
&lt;li&gt;Microservices&lt;/li&gt;
&lt;li&gt;DML and DDL in SQL&lt;/li&gt;
&lt;li&gt;Transactions in SQL&lt;/li&gt;
&lt;li&gt;Process vs Task&lt;/li&gt;
&lt;li&gt;AppDomain&lt;/li&gt;
&lt;li&gt;SOAP&lt;/li&gt;
&lt;li&gt;What is SPA&lt;/li&gt;
&lt;li&gt;How can we convert WCF to a REST service&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can see, this a long list so will take time to format the questions as well as include answers. Consider this as a draft for now.&lt;/p&gt;</content:encoded><category>jobs</category><category>dotnet</category><category>aspnet</category><category>wcf</category><author>Abhith Rajan</author></item><item><title>Enable Click-Jacking Protection - Umbraco</title><link>https://www.abhith.net/blog/enable-click-jacking-protection-umbraco/</link><guid isPermaLink="true">https://www.abhith.net/blog/enable-click-jacking-protection-umbraco/</guid><description>If your site is allowed to be IFRAMEd by another site and thus would be susceptible to click-jacking. This can be prevented by setting X-Frame-Options header or CSP. Setting X-Frame-Options explained in this article.</description><pubDate>Sat, 07 Apr 2018 07:21:00 GMT</pubDate><content:encoded>&lt;p&gt;Umbraco makes it easy to protect your site from clickjacking by providing an option to the user to turn on the protection in its backoffice. If you navigate to the &lt;strong&gt;Developer&lt;/strong&gt; section of Umbraco backoffice, Where you can find &lt;strong&gt;Health Check&lt;/strong&gt; tab, in which one of the section is “&lt;strong&gt;Security&lt;/strong&gt;”, Inside security, there is one section for &lt;strong&gt;Click-Jacking Protection&lt;/strong&gt;. If you check the security group and you can see the warning related to &lt;strong&gt;Click-Jacking&lt;/strong&gt;, and you can enable protection from there itself with the click of a button, which basically adds following to your &lt;strong&gt;system.webServer&lt;/strong&gt; section in &lt;strong&gt;web.config&lt;/strong&gt; ,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;httpProtocol&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;customHeaders&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;X-Powered-By&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;X-Frame-Options&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;X-Frame-Options&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;sameorigin&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;customHeaders&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;httpProtocol&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;httpProtocol&gt;  &lt;customHeaders&gt;    &lt;remove name=&amp;quot;X-Powered-By&amp;quot; /&gt;    &lt;remove name=&amp;quot;X-Frame-Options&amp;quot; /&gt;    &lt;add name=&amp;quot;X-Frame-Options&amp;quot; value=&amp;quot;sameorigin&amp;quot; /&gt;  &lt;/customHeaders&gt;&lt;/httpProtocol&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Setting &lt;strong&gt;X-Frame-Options&lt;/strong&gt; to &lt;strong&gt;sameorigin&lt;/strong&gt; make the page can only be displayed in a frame on the &lt;strong&gt;same origin&lt;/strong&gt; as the page itself. Also, we can set it to &lt;strong&gt;DENY&lt;/strong&gt; if wanted but then we have to exclude umbraco path since umbraco backoffice have iframes.&lt;/p&gt;
&lt;p&gt;Also, make sure you have updated web.config in your source code (version control) if you enabled clickjacking protection via backoffice. Otherwise on your next web deploy, the web.config on the host server will be overwritten with the source code version.&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=enable-click-jacking-protection-umbraco&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;X-Frame-Options - HTTP | MDN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.owasp.org/index.php/Clickjacking?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=enable-click-jacking-protection-umbraco&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Clickjacking - OWASP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>umbraco</category><category>security</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>Fix: Web deploy - could not verify the server certificate</title><link>https://www.abhith.net/blog/fix-web-deploy-could-not-verify-the-server-certificate/</link><guid isPermaLink="true">https://www.abhith.net/blog/fix-web-deploy-could-not-verify-the-server-certificate/</guid><description>Fix for &quot;Web deployment task failed. (Connected to the remote computer (&quot;xxx&quot;) using the specified process (&quot;Web Management Service&quot;), but could not verify the server’s certificate. If you trust the server, connect again and allow untrusted certificates.</description><pubDate>Fri, 06 Apr 2018 07:49:00 GMT</pubDate><content:encoded>&lt;p&gt;Today when I tried to deploy my new &lt;strong&gt;ASP.NET CORE 2&lt;/strong&gt; app to &lt;a href=&quot;http://www.smarterasp.net/index?r=100571651&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=fix-web-deploy-could-not-verify-the-server-certificate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmarterASP.NET&lt;/a&gt;, the deployment failed with a message&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Web deployment task failed. (Connected to the remote computer (“xxxxxxxxx”) using the specified process (“Web Management Service”), but could not verify the server’s certificate. If you trust the server, connect again and allow untrusted certificates.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I got the publish profile from the &lt;a href=&quot;http://www.smarterasp.net/index?r=100571651&amp;amp;ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=fix-web-deploy-could-not-verify-the-server-certificate&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;SmarterASP.NET&lt;/a&gt; control panel and when I opened the PublishSettings using VS Code, it had &lt;strong&gt;AllowUntrustedCertificate=“True”&lt;/strong&gt; which I imported to the project but when I checked the Publish Profile under my project ( Project &amp;gt; Properties &amp;gt; xxx.pubxml), there was no entry of &lt;strong&gt;AllowUntrustedCertificate&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So, in order to fix the issue, inside PropertyGroup just added&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;AllowUntrustedCertificate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;AllowUntrustedCertificate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;AllowUntrustedCertificate&gt;True&lt;/AllowUntrustedCertificate&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That solved the issue with web deploy.&lt;/p&gt;</content:encoded><category>visual-studio</category><category>hosting</category><category>aspnet-core</category><author>Abhith Rajan</author></item><item><title>Fetch Row Count for All Tables in a SQL SERVER</title><link>https://www.abhith.net/blog/fetch-row-count-for-all-tables-in-a-sql-server/</link><guid isPermaLink="true">https://www.abhith.net/blog/fetch-row-count-for-all-tables-in-a-sql-server/</guid><description>Using a short query we can list all the tables in the database along with the number of records in each table.</description><pubDate>Sun, 11 Mar 2018 20:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Just execute the below query in the database to see the list of tables and number of records in each table.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;t&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;row_count&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;tables&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; t&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;dm_db_partition_stats&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; s&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;t&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;object_id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;object_id&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;t&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;type_desc&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;#39;USER_TABLE&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;index_id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;IN&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;SELECT t.name, s.row_countFROM sys.tables t    JOIN sys.dm_db_partition_stats sON t.object_id = s.object_id    AND t.type_desc = &apos;USER_TABLE&apos;    AND s.index_id IN (0,1)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>sql-server</category><author>Abhith Rajan</author></item><item><title>Download file using WCF REST Service</title><link>https://www.abhith.net/blog/download-file-using-wcf-rest-service/</link><guid isPermaLink="true">https://www.abhith.net/blog/download-file-using-wcf-rest-service/</guid><description>Download file using WCF Service</description><pubDate>Wed, 07 Mar 2018 08:55:00 GMT</pubDate><content:encoded>&lt;p&gt;Recently, We deployed a web application in a load balanced environment. And one of the features in the app was to download some data as excel and it was working fine in DEV (as usual) but keep failing in the PROD. When I checked it on the individual servers, all worked fine but not under SLB (Software Load Balancing).&lt;/p&gt;
&lt;p&gt;So I reviewed the code and found out that there are two requests being sent, one after another, one for generating the file in the server and another one for fetching the generated file. Pretty bad implementation, right?
When is under load balanced environment, the first request may be served from one server and the second from another server. And there was no shared storage space (we used OSS). No sticky session either. So file generated in one server and it is being requested in another server which leads to 404.&lt;/p&gt;
&lt;p&gt;To solve, We had to combine both, i.e generate the file and serve it on the same request. To do that, our code look like this,&lt;/p&gt;
&lt;h4 id=&quot;service-contract-interface&quot;&gt;Service Contract Interface&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#service-contract-interface&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;WebGet&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;UriTemplate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{cultureName}/download/{someId}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;OperationContract&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Stream&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetReportByDate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;cultureName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;[WebGet(UriTemplate = &amp;quot;{cultureName}/download/{someId}&amp;quot;)][OperationContract]Stream GetReportByDate(string cultureName, string someId);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Of course it is a HTTP GET method. And the implementation looks like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Stream&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetReportByDate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;cultureName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;someId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;try&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Generate file the usual way&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;filePath&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;SomeWayGenerateFileAndReturnFilePath&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WebOperationContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WebOperationContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OutgoingResponse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Content-Disposition&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;attachment; filename=&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;fileNameWithExtension&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;             &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WebOperationContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OutgoingResponse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ContentType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/octet-stream&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;OpenRead&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;filePath&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;Exception&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;exception&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;WebProtocolException&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;HttpStatusCode&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;InternalServerError&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;$&amp;quot;ERROR: Operation faild. &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;exception&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Message&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;exception&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;InnerException&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;public Stream GetReportByDate(string cultureName, string someId){    try    {        ...         // Generate file the usual way        var filePath = SomeWayGenerateFileAndReturnFilePath();        if (WebOperationContext.Current != null)        {            WebOperationContext.Current.OutgoingResponse.Headers[&amp;quot;Content-Disposition&amp;quot;] =        &amp;quot;attachment; filename=&amp;quot; + fileNameWithExtension;             WebOperationContext.Current.OutgoingResponse.ContentType = &amp;quot;application/octet-stream&amp;quot;;        }        return File.OpenRead(filePath);    }    catch (Exception exception)    {        throw new WebProtocolException(HttpStatusCode.InternalServerError, $&amp;quot;ERROR: Operation faild. {exception.Message}&amp;quot;, exception.InnerException);    }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Here &lt;strong&gt;ContentType&lt;/strong&gt; can be whatever it is, if you know it. &lt;strong&gt;application/octet-stream&lt;/strong&gt; is appropriate for entitites whose sole intended purpose is to be saved to disk.
If you only generates say PDF, then the content type part can be changed to,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WebOperationContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OutgoingResponse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Headers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Content-Disposition&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;attachment; filename=MyFileName.pdf&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;WebOperationContext&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;OutgoingResponse&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ContentType&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/pdf&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;WebOperationContext.Current.OutgoingResponse.Headers[&amp;quot;Content-Disposition&amp;quot;]  = &amp;quot;attachment; filename=MyFileName.pdf&amp;quot;;WebOperationContext.Current.OutgoingResponse.ContentType  = &amp;quot;application/pdf&amp;quot;;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That’s it.&lt;/p&gt;</content:encoded><category>wcf</category><category>dotnet</category><author>Abhith Rajan</author></item><item><title>Vue.js List Rendering : Limit items in v-for</title><link>https://www.abhith.net/blog/vue-js-list-rendering-limit-items-in-v-for/</link><guid isPermaLink="true">https://www.abhith.net/blog/vue-js-list-rendering-limit-items-in-v-for/</guid><description>One way to limit the iteration of items in Vue v-for directive.</description><pubDate>Tue, 27 Feb 2018 18:25:00 GMT</pubDate><content:encoded>&lt;p&gt;Today I had to render 200+ items in a bootstrap table which didn’t appear to be user-friendly. So I planned to show first 20 of them on load, and if the user wanted, show full items.&lt;/p&gt;
&lt;p&gt;To do that, my Vue app code looks like this,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Vue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;({&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;el: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;#app&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;data: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;countries: [],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;isLoadingCountries: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;showLessCountries: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;methods: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;getCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isLoadingCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$http&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;some-url&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;then&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isSuccess&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;countries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;countries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;then&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isLoadingCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;created&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;getCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var app = new Vue({  el: &amp;quot;#app&amp;quot;,  data: {    countries: [],    isLoadingCountries: false,    showLessCountries: true,  },  methods: {    getCountries: function () {      app.isLoadingCountries = true;      app.$http        .get(&amp;quot;some-url&amp;quot;)        .then(function (response) {          if (response.data) {            if (response.data.isSuccess) {              app.countries = response.data.countries;            }          }        })        .then(function () {          app.isLoadingCountries = false;        });    },  },  created: function () {    this.getCountries();  },});&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Basically, it contains an array, one flag to indicate the data fetch operation is ongoing or not, one flag to indicate whether the full list is showing or fewer items, and a function to fill the data in the array. I hope the naming convention in the code is pretty self-explanatory.&lt;/p&gt;
&lt;p&gt;And my markup,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;table&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;!isLoadingCountries&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;thead&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;th&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;col&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;th&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;thead&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tbody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;showLessCountries&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-for&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;country in countries.slice(0, 20)&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{{country.name}}&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tbody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tbody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--2:#5C6565&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;v-else&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-for&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;country in countries&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{{country.name}}&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tbody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;button&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;!isLoadingCountries&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;@@click&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;showLessCountries = !showLessCountries&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{{showLessCountries===true? &amp;quot;Show All Countries&amp;quot; : &amp;quot;Show Less&amp;quot;}}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;table class=&amp;quot;table&amp;quot; v-if=&amp;quot;!isLoadingCountries&amp;quot;&gt;  &lt;thead&gt;    &lt;tr&gt;      &lt;th scope=&amp;quot;col&amp;quot;&gt;Country&lt;/th&gt;    &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody v-if=&amp;quot;showLessCountries&amp;quot;&gt;    &lt;tr v-for=&amp;quot;country in countries.slice(0, 20)&amp;quot;&gt;      &lt;td&gt;&lt;h5&gt;{{country.name}}&lt;/h5&gt;&lt;/td&gt;    &lt;/tr&gt;  &lt;/tbody&gt;  &lt;tbody v-else&gt;    &lt;tr v-for=&amp;quot;country in countries&amp;quot;&gt;      &lt;td&gt;&lt;h5&gt;{{country.name}}&lt;/h5&gt;&lt;/td&gt;    &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;&lt;button  v-if=&amp;quot;!isLoadingCountries&amp;quot;  @@click=&amp;quot;showLessCountries = !showLessCountries&amp;quot;&gt;  {{showLessCountries===true? &amp;quot;Show All Countries&amp;quot; : &amp;quot;Show Less&amp;quot;}}&lt;/button&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Here, Using &lt;strong&gt;Array.slice()&lt;/strong&gt;, we get a new array with the limited number of items from the original array. And we show the new sliced array items or the original array full items based on the flag. And a button to toggle the flag. If you wonder why I used **@@**click in Vue, is because my markup was written in &lt;strong&gt;Razor&lt;/strong&gt; (.cshtml).&lt;/p&gt;
&lt;h3 id=&quot;update-1---sep-6-2018&quot;&gt;Update 1 - Sep 6, 2018&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#update-1---sep-6-2018&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As &lt;strong&gt;&lt;em&gt;Andrew Butler&lt;/em&gt;&lt;/strong&gt; pointed out in the comments, we can avoid the markup duplication by using a computed property. And the code becomes,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Vue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;({&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;el: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;#app&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;data: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;countries: [],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;isLoadingCountries: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;showLessCountries: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;computed: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;countriesToDisplay&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;showLessCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;countries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;slice&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;countries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;methods: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;getCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isLoadingCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;$http&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;some-url&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;then&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isSuccess&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;              &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;countries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;countries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;then&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isLoadingCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;created&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;getCountries&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var app = new Vue({  el: &amp;quot;#app&amp;quot;,  data: {    countries: [],    isLoadingCountries: false,    showLessCountries: true,  },  computed: {    countriesToDisplay: function () {      if (this.showLessCountries) {        return this.countries.slice(0, 10);      } else {        return this.countries;      }    },  },  methods: {    getCountries: function () {      app.isLoadingCountries = true;      app.$http        .get(&amp;quot;some-url&amp;quot;)        .then(function (response) {          if (response.data) {            if (response.data.isSuccess) {              app.countries = response.data.countries;            }          }        })        .then(function () {          app.isLoadingCountries = false;        });    },  },  created: function () {    this.getCountries();  },});&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And the markup,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;table&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;!isLoadingCountries&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;thead&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;th&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;col&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;Country&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;th&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;thead&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tbody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-for&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;country in countriesToDisplay&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{{country.name}}&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;tbody&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;button&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;!isLoadingCountries&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;@@click&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;showLessCountries = !showLessCountries&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{{showLessCountries===true? &amp;quot;Show All Countries&amp;quot; : &amp;quot;Show Less&amp;quot;}}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;table class=&amp;quot;table&amp;quot; v-if=&amp;quot;!isLoadingCountries&amp;quot;&gt;  &lt;thead&gt;    &lt;tr&gt;      &lt;th scope=&amp;quot;col&amp;quot;&gt;Country&lt;/th&gt;    &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;    &lt;tr v-for=&amp;quot;country in countriesToDisplay&amp;quot;&gt;      &lt;td&gt;        &lt;h5&gt;{{country.name}}&lt;/h5&gt;      &lt;/td&gt;    &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;&lt;button  v-if=&amp;quot;!isLoadingCountries&amp;quot;  @@click=&amp;quot;showLessCountries = !showLessCountries&amp;quot;&gt;  {{showLessCountries===true? &amp;quot;Show All Countries&amp;quot; : &amp;quot;Show Less&amp;quot;}}&lt;/button&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If you know a better way to do the same, let me know.&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=vue-js-list-rendering-limit-items-in-v-for&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Array.prototype.slice()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://vuejs.org/v2/guide/computed.html?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=vue-js-list-rendering-limit-items-in-v-for&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Computed Properties and Watchers — Vue.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>vue</category><category>javascript</category><author>Abhith Rajan</author></item><item><title>Sitefinity Development - Problems and Solutions</title><link>https://www.abhith.net/blog/sitefinity-development-problems-solutions/</link><guid isPermaLink="true">https://www.abhith.net/blog/sitefinity-development-problems-solutions/</guid><description>During my first Sitefinity project, I encountered few problems, in which some of them are explained here.</description><pubDate>Fri, 19 Jan 2018 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Through this post, am sharing some of the problems I encountered during development in a &lt;strong&gt;Sitefinity&lt;/strong&gt; project.&lt;/p&gt;
&lt;h4 id=&quot;child-pages-not-showing-in-navigation-menu&quot;&gt;Child pages not showing in navigation menu&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#child-pages-not-showing-in-navigation-menu&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;We were customized the navigation template to match up with our design, and our menu layout had up to 2 levels. The problem was, only first level menu’s being displayed. It was actually a simple configuration which we missed, on the navigation widget settings, make sure to check the level to display. In our case, it was 1. So no child items are shown. After setting it to 2, the child items shown fine. Simple thing but wasted an hour on this.&lt;/p&gt;
&lt;h4 id=&quot;caching-issue-for-pages-with-no-caching-profile&quot;&gt;Caching issue for pages with NO CACHING profile&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#caching-issue-for-pages-with-no-caching-profile&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;I wrote another article just for this. Check it out &lt;a href=&quot;https://www.abhith.net/blog/sitefinity-caching-issue-for-pages-with-no-caching-profile/&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;localization-not-reflecting-in-when-resource-files-are-updated&quot;&gt;Localization not reflecting in when resource files are updated&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#localization-not-reflecting-in-when-resource-files-are-updated&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Restart the website or recycle the app pool associated with the website in the IIS in order to see the localization updates.&lt;/p&gt;
&lt;h4 id=&quot;forgot-password-email-not-triggered&quot;&gt;Forgot password email not triggered&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#forgot-password-email-not-triggered&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Go through the KB article with directions on what needs to be configured and an example screencast ( &lt;a href=&quot;http://www.screencast.com/t/EF0N2LSiwV?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=sitefinity-development-problems-solutions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;http://www.screencast.com/t/EF0N2LSiwV&lt;/a&gt; ) . Also, the KB describes how to configure smtp4dev so you can test the set-up.&lt;/p&gt;
&lt;article class=&quot;link-preview link-preview--no-media&quot; data-astro-cid-4wkxthgh&gt; &lt;div class=&quot;link-preview__content&quot; data-astro-cid-4wkxthgh&gt; &lt;header data-astro-cid-4wkxthgh&gt; &lt;a class=&quot;link-preview__title&quot; href=&quot;https://knowledgebase.progress.com/articles/Article/How-to-use-smtp4dev-to-test-Sitefinity-emails&quot; data-astro-cid-4wkxthgh&gt; Progress Customer Community &lt;/a&gt;  &lt;small class=&quot;link-preview__domain&quot; data-astro-cid-4wkxthgh&gt;knowledgebase.progress.com&lt;/small&gt; &lt;/header&gt; &lt;small class=&quot;link-preview__description&quot; data-astro-cid-4wkxthgh&gt;&lt;/small&gt; &lt;/div&gt;  &lt;/article&gt;
&lt;p&gt;Note that this is an example for forms notifications, so in your case, you do not need to follow 3. Enable Forms notifications.&lt;/p&gt;
&lt;p&gt;However, please make sure that Password Recovery is configured correctly. EnablePasswordReset needs to be set to true and enablePasswordRetrieval should be set to false. Please, check this documentation:&lt;/p&gt;
&lt;article class=&quot;link-preview link-preview--no-media&quot; data-astro-cid-4wkxthgh&gt; &lt;div class=&quot;link-preview__content&quot; data-astro-cid-4wkxthgh&gt; &lt;header data-astro-cid-4wkxthgh&gt; &lt;a class=&quot;link-preview__title&quot; href=&quot;https://docs.sitefinity.com/administration-configure-the-password-recovery-link&quot; data-astro-cid-4wkxthgh&gt;  Configure the password recovery link &lt;/a&gt;  &lt;small class=&quot;link-preview__domain&quot; data-astro-cid-4wkxthgh&gt;progress.com&lt;/small&gt; &lt;/header&gt; &lt;small class=&quot;link-preview__description&quot; data-astro-cid-4wkxthgh&gt;Configure password recovery for the Sitefinity CMS application, including SMTP settings and parameters for forgotten password.&lt;/small&gt; &lt;/div&gt;  &lt;/article&gt;
&lt;p&gt;Also, note that restart of the application is required.&lt;/p&gt;</content:encoded><category>cookbook</category><category>sitefinity</category><category>cms</category><author>Abhith Rajan</author></item><item><title>ASP.NET Web Forms - Manually Trigger Client Side Validation</title><link>https://www.abhith.net/blog/aspnet-web-forms-manually-trigger-client-side-validation/</link><guid isPermaLink="true">https://www.abhith.net/blog/aspnet-web-forms-manually-trigger-client-side-validation/</guid><description>You can manually trigger client-side validation for ASP.NET Web Forms Server side controls. One way of doing it explained here.</description><pubDate>Mon, 15 Jan 2018 23:32:28 GMT</pubDate><content:encoded>&lt;p&gt;Lets say you have a web form with one more serverside controls like one below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;asp:TextBox&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;txtEmail&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;txtBoxLarge textSmall&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;placeholder&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Enter Email Address&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;asp:TextBox&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;asp:RequiredFieldValidator&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;rfvEmail&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ErrorMessage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Enter Email&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Display&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;None&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ControlToValidate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;txtEmail&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ValidationGroup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;groupName&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;asp:RequiredFieldValidator&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;asp:TextBox  ID=&amp;quot;txtEmail&amp;quot;  runat=&amp;quot;server&amp;quot;  class=&amp;quot;txtBoxLarge textSmall&amp;quot;  placeholder=&amp;quot;Enter Email Address&amp;quot;&gt;&lt;/asp:TextBox&gt;&lt;asp:RequiredFieldValidator  ID=&amp;quot;rfvEmail&amp;quot;  runat=&amp;quot;server&amp;quot;  ErrorMessage=&amp;quot;Enter Email&amp;quot;  Display=&amp;quot;None&amp;quot;  ControlToValidate=&amp;quot;txtEmail&amp;quot;  ValidationGroup=&amp;quot;groupName&amp;quot;&gt;&lt;/asp:RequiredFieldValidator&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And you need to do some client side operations along with client side validation, the button triggering the whole operation will be like,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#B31D28;--0fs:italic;--1:#FDAEB7;--1fs:italic;--2:#BD2B28&quot;&gt;asp:Button&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;btnSubmit&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;CssClass&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;blueBtnLarge&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Continue&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ValidationGroup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;groupName&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;OnClick&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;btnSubmit_Click&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;OnClientClick&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ClientSideClick(this)&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;UseSubmitBehavior&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;asp:Button  ID=&amp;quot;btnSubmit&amp;quot;  CssClass=&amp;quot;blueBtnLarge&amp;quot;  runat=&amp;quot;server&amp;quot;  Text=&amp;quot;Continue&amp;quot;  ValidationGroup=&amp;quot;groupName&amp;quot;  OnClick=&amp;quot;btnSubmit_Click&amp;quot;  OnClientClick=&amp;quot;ClientSideClick(this)&amp;quot;  UseSubmitBehavior=&amp;quot;False&amp;quot;/&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Here &lt;strong&gt;OnClick&lt;/strong&gt; will send request to server side and &lt;strong&gt;OnClientClick&lt;/strong&gt; will execute on client side before control passed to server. &lt;strong&gt;OnClick&lt;/strong&gt; only will be triggered if &lt;strong&gt;OnClientClick&lt;/strong&gt; returned &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And the client side JavaScript function we call on &lt;strong&gt;OnClientClick&lt;/strong&gt; will be like below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ClientSideClick&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#AE4B07;--1:#FFAB70&quot;&gt;myButton&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Any operation before validation goes here&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Client side validation&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;window&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Page_ClientValidate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;function&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;window&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Page_ClientValidate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;groupName&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;document&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;getElementById&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;someDivElementWithErrorExplanation&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;block&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Showing error on validation, modify to your needs&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;document&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;getElementById&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;someDivElementWithErrorExplanation&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// Any operation after client side validation passess goes here.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That’s it. Also, don’t forget to notice the usage of the &lt;strong&gt;ValidationGroup&lt;/strong&gt; all over the code above.&lt;/p&gt;</content:encoded><category>aspnet-web-forms</category><category>sharepoint</category><author>Abhith Rajan</author></item><item><title>Best Font for Visual Studio</title><link>https://www.abhith.net/blog/best-font-for-visual-studio/</link><guid isPermaLink="true">https://www.abhith.net/blog/best-font-for-visual-studio/</guid><description>Looking for the best font for programming?
Checkout the top three here.</description><pubDate>Mon, 15 Jan 2018 09:17:00 GMT</pubDate><content:encoded>&lt;p&gt;Unlike the default user, most programmers do care about the font they are using, so do I.
The most used IDEs in my case are the brothers, Visual Studio, and the Visual Studio Code.
In both, I use the same font which is &lt;strong&gt;Cascadia Code&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;cascadia-code&quot;&gt;Cascadia Code&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#cascadia-code&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After reading &lt;a href=&quot;https://devblogs.microsoft.com/math-in-office/cascadia-code-font/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; article, I switched to &lt;code&gt;Cascadia Code&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Cascadia Code font is an open-source font developed to improve the readability of program text in plain-text editors such as in the Windows Terminal, Microsoft Visual Studio, and Visual Studio Code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://github.com/microsoft/cascadia-code?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GitHub - microsoft/cascadia-code: This is a fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal.&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;previously-used&quot;&gt;Previously Used&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#previously-used&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;jetbrains-mono&quot;&gt;JetBrains Mono&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#jetbrains-mono&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Try JetBrains Mono in your IDE. Its simple forms and attention to every detail make coding a nice experience for developers’ eyes, no matter which IDE you choose.
Check out the official website. The website itself is &lt;strong&gt;MARVELLOUS&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href=&quot;https://www.jetbrains.com/lp/mono/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;JetBrains Mono: A free and open source typeface for developers&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;vs-code-settings&quot;&gt;VS Code Settings&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#vs-code-settings&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;editor.fontFamily&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;JetBrains Mono, Fira Code&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;editor.fontSize&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;13&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;editor.fontLigatures&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#7E5F00&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;editor.letterSpacing&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;1.2&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&amp;quot;editor.fontFamily&amp;quot;: &amp;quot;JetBrains Mono, Fira Code&amp;quot;,&amp;quot;editor.fontSize&amp;quot;: 13,&amp;quot;editor.fontLigatures&amp;quot;: true,&amp;quot;editor.letterSpacing&amp;quot;: 1.2,&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;fira-code&quot;&gt;Fira Code&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#fira-code&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Monospaced font with programming ligatures.&lt;/p&gt;
&lt;p&gt;👉 GitHub: &lt;a href=&quot;https://github.com/tonsky/FiraCode?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;tonsky/FiraCode&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All the instructions to install the font and configuring it in the IDE’s including &lt;strong&gt;Visual Studio&lt;/strong&gt; and &lt;strong&gt;Visual Studio Code&lt;/strong&gt; is documented in the wiki.&lt;/p&gt;
&lt;h3 id=&quot;fantasque-sans-mono&quot;&gt;Fantasque Sans Mono&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#fantasque-sans-mono&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Fantasque Sans Mono is my choice for the past two years. You need to try it to see how good it is.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A programming font, designed with functionality in mind, and with some wibbly-wobbly handwriting-like fuzziness that makes it unassumingly cool.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;👉 GitHub: &lt;a href=&quot;https://github.com/belluzj/fantasque-sans?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;belluzj/fantasque-sans&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;how-to-install-the-new-font-windows&quot;&gt;How to install the new font (windows)&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#how-to-install-the-new-font-windows&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Download the font from &lt;a href=&quot;https://github.com/belluzj/fantasque-sans/releases/latest?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In the ttf folder, double-click each font file, click “Install font”; to install all at once, select all files, right-click, and choose “Install”.&lt;/li&gt;
&lt;li&gt;Open Visual Studio settings. &lt;strong&gt;Tools &amp;gt; Options &amp;gt; Environment &amp;gt; Fonts and Colors&lt;/strong&gt; &amp;gt; Choose &lt;strong&gt;Fantasque Sans Mono&lt;/strong&gt; from the font
list &amp;gt; OK.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let me know which one is your favorite in the comments below 👇&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/belluzj/fantasque-sans?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GitHub - belluzj/fantasque-sans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://fontlibrary.org/en/font/fantasque-sans-mono?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-font-for-visual-studio&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Fantasque Sans Mono page in fontlibrary.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>visual-studio</category><category>ide</category><category>awesome-list</category><author>Abhith Rajan</author></item><item><title>IP Security - Configure IP address restrictions in Web.Config on IIS</title><link>https://www.abhith.net/blog/ip-security-configure-ip-address-restrictions-in-web-config-on-iis/</link><guid isPermaLink="true">https://www.abhith.net/blog/ip-security-configure-ip-address-restrictions-in-web-config-on-iis/</guid><description>Restrict access to your website using IIS IP security</description><pubDate>Tue, 09 Jan 2018 09:22:00 GMT</pubDate><content:encoded>&lt;p&gt;When your website is using some kind of proxy/firewall just like &lt;strong&gt;Sucuri&lt;/strong&gt; to increase the security, you need to make sure that only the allowed ones are accessing the site directly, so that all the requests to the site is going through the firewall.&lt;/p&gt;
&lt;p&gt;To ensure this, we use the &lt;strong&gt;IP security&lt;/strong&gt; feature in IIS, in which we can configure which IP’s are allowed.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;security&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;ipSecurity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowUnlisted&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;clear&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ipAddress&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;subnetMask&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ipAddress&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;subnetMask&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ipAddress&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;subnetMask&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ipAddress&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;subnetMask&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;-.-.-.-&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;ipSecurity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;security&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;system.webServer&gt;  ...  &lt;security&gt;    &lt;ipSecurity allowUnlisted=&amp;quot;false&amp;quot;&gt;      &lt;clear /&gt;      &lt;add ipAddress=&amp;quot;-.-.-.-&amp;quot; subnetMask=&amp;quot;-.-.-.-&amp;quot; allowed=&amp;quot;true&amp;quot; /&gt;      &lt;add ipAddress=&amp;quot;-.-.-.-&amp;quot; subnetMask=&amp;quot;-.-.-.-&amp;quot; allowed=&amp;quot;true&amp;quot; /&gt;      &lt;add ipAddress=&amp;quot;-.-.-.-&amp;quot; subnetMask=&amp;quot;-.-.-.-&amp;quot; allowed=&amp;quot;true&amp;quot; /&gt;      &lt;add ipAddress=&amp;quot;-.-.-.-&amp;quot; subnetMask=&amp;quot;-.-.-.-&amp;quot; allowed=&amp;quot;true&amp;quot; /&gt;    &lt;/ipSecurity&gt;    ...  &lt;/security&gt;&lt;/system.webServer&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above code, we set allowUnlisted attribute to false to prevent access to all IP address unless they are listed. And then we add the allowed IP addresses one by one.
eg.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ipAddress&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;192.168.134.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;subnetMask&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;255.255.254.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;allowed&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;add ipAddress=&amp;quot;192.168.134.0&amp;quot; subnetMask=&amp;quot;255.255.254.0&amp;quot; allowed=&amp;quot;true&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;additional-resource&quot;&gt;Additional Resource&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resource&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/iis/configuration/system.webserver/security/ipsecurity?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=ip-security-configure-ip-address-restrictions-in-web-config-on-iis&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;IP Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>iis</category><category>security</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>2017 Year In Review</title><link>https://www.abhith.net/blog/2017-year-in-review/</link><guid isPermaLink="true">https://www.abhith.net/blog/2017-year-in-review/</guid><description>Abhith Rajan&apos;s  2017 year in review.</description><pubDate>Mon, 01 Jan 2018 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;Last year on my appraisal form, under objectives for next year (2017), I put the following,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#1&quot;&gt;[ ] Work on projects using technology .NET CORE, Angular 2, Typescript 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#2&quot;&gt;[ ] Get a new designation (Senior Software Engineer / Project Manager / DevOps Manager)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#3&quot;&gt;[ ] Learn product management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#4&quot;&gt;[x] Mentor more&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#5&quot;&gt;[x] Contribute more to Open Source&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;work-on-projects-using-technology-net-core-angular-2-typescript-2---inconclusive&quot;&gt;Work on projects using technology .NET CORE, Angular 2, Typescript 2 - Inconclusive&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#work-on-projects-using-technology-net-core-angular-2-typescript-2---inconclusive&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I did work on Angular 2 &amp;amp; Angular 4 and Typescript a little as part of my side project which is in Ionic. But that isn’t enough and I didn’t find time for .NET Core, basically, I was giving time to let it get mature enough since initially SignalR etc weren’t supported. Now I really need to focus on it since am a C# guy.&lt;/p&gt;
&lt;p&gt;Apart from the above, I did learn/tried some other, some of which are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Umbraco&lt;/li&gt;
&lt;li&gt;Vue&lt;/li&gt;
&lt;li&gt;Xamarin Forms&lt;/li&gt;
&lt;li&gt;React Native&lt;/li&gt;
&lt;li&gt;Sitefinity&lt;/li&gt;
&lt;li&gt;AWS&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;umbraco&quot;&gt;Umbraco&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#umbraco&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;In my knowledge, Umbraco is the best free cms in the .Net platform, and yeah, I am using it for this website. Last year or so when my manager asked me to update our existing custom CMS for the upcoming projects, I suggested to try Umbraco since one of my colleagues have experience in it, and he agreed. That was a turning point for the company. Now for most of the small-scale projects, we use Umbraco.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Blogged : My favorite list of Umbraco packages &lt;a href=&quot;https://t.co/p9De8FSmOx&quot;&gt;https://t.co/p9De8FSmOx&lt;/a&gt;&lt;a href=&quot;https://x.com/hashtag/umbraco?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#umbraco&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/best?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#best&lt;/a&gt;-series&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/900801563924496384?ref_src=twsrc%5Etfw&quot;&gt;August 24, 2017&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;h4 id=&quot;vue&quot;&gt;Vue&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#vue&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Vue is our number one choice when it comes to client-side programming. It is because of its easiness to use, structured code etc. Some of our flagship products are built using Vue including Digital raffle draw and Socialboard.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Even on sick leave (eye infection) I can&amp;#39;t close my eyes against .&lt;a href=&quot;https://x.com/maxedapps?ref_src=twsrc%5Etfw&quot;&gt;@maxedapps&lt;/a&gt; .&lt;a href=&quot;https://x.com/vuejs?ref_src=twsrc%5Etfw&quot;&gt;@vuejs&lt;/a&gt; course, it&amp;#39;s so exciting.&lt;a href=&quot;https://x.com/hashtag/VueJS?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#VueJS&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/827233364050591744?ref_src=twsrc%5Etfw&quot;&gt;February 2, 2017&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;h4 id=&quot;xamarin-forms&quot;&gt;Xamarin forms&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#xamarin-forms&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Learning Xamarin forms was just personal and we don’t use it in the company since my current company focused on Web for now.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;&lt;a href=&quot;https://x.com/hashtag/Ionic?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Ionic&lt;/a&gt; guy going to try &lt;a href=&quot;https://x.com/hashtag/Xamarin?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Xamarin&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/849329774971506688?ref_src=twsrc%5Etfw&quot;&gt;April 4, 2017&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;I had a personal project piggyvault.in, and for its mobile application, I used ionic. The app built so faster since ionic was very easy because of the knowledge I had in AngularJS. After few months, I fall for Xamarin because of its native nature And I tried Xamarin Android first,&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Learning async tasks in detail just to rescue my hello world &lt;a href=&quot;https://x.com/hashtag/Xamarin?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Xamarin&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/Android?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Android&lt;/a&gt; app from deadlock.&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/857673566166319105?ref_src=twsrc%5Etfw&quot;&gt;April 27, 2017&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;it was tough but I did little of my ionic app in xamarin android, then I tried Xamarin Forms, it was also little tough at the beginning but later I got the rhythm and I managed to build around 20% my ionic app and I was really impressed with the look and performance of my Xamarin Forms app but the downside was, when comparing it to the Ionic, the amount of code we had to write to make it work, and the build time to see the output in a simulator and few other which I mentioned in one of my post &lt;a href=&quot;https://www.abhith.net/blog/xamarin-development-problems-and-solutions/&quot;&gt;here&lt;/a&gt; (also I didn’t have a powerful machine), it was so much time consuming compared to ionic and when we do it in the free time we had, the time counts. So I moved to react native.&lt;/p&gt;
&lt;h4 id=&quot;react-native&quot;&gt;React Native&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#react-native&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Initially, I thought React Native is like ionic, but I was wrong after I realized the native nature of React Native. I started learning it and along with it started working on my react native version of my piggy app and now it is around 30% done compared to the Ionic version. Learning React Native, redux etc was tough since I was new to react even. But I picked the pace once I figured out the component nature of it’s and it’s really cool. And things like EXPO are so cool that, when we start to try with the expo, we will figure out how much time did we wasted in Xamarin to build and see the output in an emulator, wherein expo we see the instant result in our own device. Also now there is live loading app for Xamarin forms which I tried during my Xamarin forms time but didn’t work for me the way expo worked. Later I ejected from expo to have OneSignal integration in my react native app. Using OneSignal for push notifications is so easy, all the mobile apps Ionic, Xamarin Forms and now React Native have OneSignal integration and it won’t take much time to integrate.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;I never thought push notifications on &lt;a href=&quot;https://x.com/hashtag/Ionic2?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#Ionic2&lt;/a&gt;  is so easy with &lt;a href=&quot;https://x.com/onesignal?ref_src=twsrc%5Etfw&quot;&gt;@onesignal&lt;/a&gt;, all done under 15min, hoo. And it&amp;#39;s pricing actually blow my mind &lt;a href=&quot;https://t.co/M179m1h5dX&quot;&gt;pic.twitter.com/M179m1h5dX&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/816735753988427778?ref_src=twsrc%5Etfw&quot;&gt;January 4, 2017&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;h4 id=&quot;sitefinity&quot;&gt;Sitefinity&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#sitefinity&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;After we tried Umbraco, it becomes the primary cms solution, and we used it for most of the websites last year, and custom cms for complicated applications. But we received a requirement to built one website in Sitefinity and yes we did. So far I like Sitefinity more than Umbraco, and yes Umbraco is good for small-scale projects. I loved the easiness to localize pages and things in Sitefinity and there is a ton of configurations and all, still learning. The project which we worked now on UAT stage, so far good.&lt;/p&gt;
&lt;h4 id=&quot;aws&quot;&gt;AWS&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#aws&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;We used to host most of the apps we make in Microsoft Azure or other third-party hosting providers, never AWS and last year for a client we had to host in AWS and we did. Honestly speaking, the name of things and UX experience of AWS is too low compared to Azure. My comparison of AWS and Azure experience is in the draft, will publish soon.&lt;/p&gt;
&lt;h3 id=&quot;get-a-new-designation-senior-software-engineer--project-manager--devops-manager---na&quot;&gt;Get a new designation (Senior Software Engineer / Project Manager / DevOps Manager) - NA&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#get-a-new-designation-senior-software-engineer--project-manager--devops-manager---na&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I wasn’t able to achieve this since there are no such positions in my current company. And the one above me is the IT DIRECTOR.&lt;/p&gt;
&lt;h3 id=&quot;learn-product-management---inconclusive&quot;&gt;Learn product management - inconclusive&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#learn-product-management---inconclusive&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Apart from some video tutorials, and reading knowledge. Nothing more I learned. But I am doing it with my knowledge, for Socialboard, raffle, and for other projects. I want to learn it properly so that I can do it properly.&lt;/p&gt;
&lt;h3 id=&quot;mentor-more&quot;&gt;Mentor more&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#mentor-more&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I learn/try first and pass it to the colleagues. In case of Vue, AWS, Sitefinity and all, the same happened. I like to do things in the more organized way,&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;My new daily office work board at &lt;a href=&quot;https://x.com/hashtag/trello?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#trello&lt;/a&gt; &lt;br&gt;A card for each day with a checklist of to-dos. Keep it simple, right :) &lt;a href=&quot;https://t.co/rCSFUKVU1R&quot;&gt;pic.twitter.com/rCSFUKVU1R&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/757316832969760768?ref_src=twsrc%5Etfw&quot;&gt;July 24, 2016&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;we initially used &lt;strong&gt;Asana&lt;/strong&gt; for task management,&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;New board layout in &lt;a href=&quot;https://x.com/asana?ref_src=twsrc%5Etfw&quot;&gt;@asana&lt;/a&gt; is awesome. &lt;a href=&quot;https://t.co/zQaF3f9vXN&quot;&gt;pic.twitter.com/zQaF3f9vXN&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/798767656128000000?ref_src=twsrc%5Etfw&quot;&gt;November 16, 2016&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;&lt;strong&gt;Slack&lt;/strong&gt; for group communication, &lt;strong&gt;Skype&lt;/strong&gt; for vocal communications and that’s too many tabs in the browser. Now we use Bitrix24 for all, it has task management, group communications, and vocal/video calls and more. I introduced it to the company after trying myself and it was a good change. I always appreciate people for their goodness. My colleagues make fun of me for saying &lt;strong&gt;thanks&lt;/strong&gt; to them for the little things they have done for me. It’s part my nature. And the same way sharing my experiences and thoughts with my colleagues, when they are in a mess, they seek my advice and I tend to have a solution in every situation. In the middle of last year, I started PR reviews, and now it’s part of our workflow for major projects and no comments received for any of my code and I did correct/improvise my colleague’s codes and did appreciate when I see the good code.&lt;/p&gt;
&lt;h3 id=&quot;contribute-more-to-open-source&quot;&gt;Contribute more to Open Source&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#contribute-more-to-open-source&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you count the stars I have given in GitHub for others projects, that’s too much contribution in some way to courage them to continue their good work. Other than that, this blog is one of my initiatives.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;My site (&lt;a href=&quot;https://t.co/uEYEWL312U&quot;&gt;https://t.co/uEYEWL312U&lt;/a&gt;) contents copied into a &lt;a href=&quot;https://x.com/hashtag/github?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#github&lt;/a&gt; repo for better &lt;a href=&quot;https://x.com/hashtag/collaboration?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#collaboration&lt;/a&gt; &lt;a href=&quot;https://t.co/oeammZOWKG&quot;&gt;https://t.co/oeammZOWKG&lt;/a&gt;&lt;a href=&quot;https://x.com/hashtag/community?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#community&lt;/a&gt; &lt;a href=&quot;https://x.com/hashtag/matters?src=hash&amp;amp;ref_src=twsrc%5Etfw&quot;&gt;#matters&lt;/a&gt;&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/903215867353280512?ref_src=twsrc%5Etfw&quot;&gt;August 31, 2017&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;Apart from the above, there is a couple of things. One of our flagship products digital raffle draw system went live. The other product Socialboard is getting its momentum, and the feedback app also went live.&lt;/p&gt;
&lt;p&gt;Last year I received (1000/6000) *100=(1/6)*100 = 16.6667 % raise. And I did perform well. Our team delivered around 8 new projects including two new products and maintained around 20 old projects. Talking about the experience in the company, it was floating, lows and highs. My working time is 10 am to 6 pm, Sunday to Thursday and 10 am to 2 am, on Saturdays. The Saturday half day work is the most annoying since I believe developers need 2 days off so that they can sharpen their axes and get a fresh start from the next week. And the startup nature of the company, ie too many works, few resources. Time, quality, cost at which time is the main constraint for the projects we got, that way controlling cost. But we have to deliver quality as well. As everyone knows, these will not work well and so the work pressure. Handling minimum of two-three projects 95% of days for the past year.&lt;/p&gt;
&lt;astro-embed-tweet&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-dnt=&quot;true&quot; data-theme=&quot;light&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Today I touched around 8 projects, managed some, coded some, even talked to the client for some. This is how my normal office day looks like&lt;/p&gt;&amp;mdash; Abhith Rajan (@AbhithRajan) &lt;a href=&quot;https://x.com/AbhithRajan/status/752942614979248129?ref_src=twsrc%5Etfw&quot;&gt;July 12, 2016&lt;/a&gt;&lt;/blockquote&gt;

&lt;/astro-embed-tweet&gt;
&lt;p&gt;It needs to change, hoping for a miracle.&lt;/p&gt;
&lt;p&gt;And that’s that.&lt;/p&gt;</content:encoded><category>general</category><author>Abhith Rajan</author></item><item><title>Sitefinity - Caching issue for pages with NO CACHING profile</title><link>https://www.abhith.net/blog/sitefinity-caching-issue-for-pages-with-no-caching-profile/</link><guid isPermaLink="true">https://www.abhith.net/blog/sitefinity-caching-issue-for-pages-with-no-caching-profile/</guid><description>If you experiencing cache issue for pages with No Caching profile in Sitefinity, check this post.</description><pubDate>Mon, 18 Dec 2017 09:17:00 GMT</pubDate><content:encoded>&lt;h3 id=&quot;issue&quot;&gt;ISSUE&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#issue&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In our &lt;strong&gt;Sitefinity&lt;/strong&gt; project, we have a page “Application” for which we set view permission to allow only users having role “USERS”. (i.e only USERS can access the page).&lt;/p&gt;
&lt;p&gt;Once USERS logged in, we are redirecting them to the Application page, once they are logged out, we are redirecting them back to the homepage.&lt;/p&gt;
&lt;p&gt;The problem is after log out and they redirected to the homepage, if they hit &lt;strong&gt;BACK&lt;/strong&gt; button in the browser, the Application page is still accessible (from CACHE), and if we reload, then only it redirects to the login page.&lt;/p&gt;
&lt;p&gt;The Application page caching is set to &lt;strong&gt;NO Caching&lt;/strong&gt; in the &lt;strong&gt;Sitefinity&lt;/strong&gt; but still this behavior.&lt;/p&gt;
&lt;p&gt;The expecting behavior is once user logged out and if they hit back button, we need to redirect to the login page.&lt;/p&gt;
&lt;h3 id=&quot;solution&quot;&gt;Solution&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You must go to the &lt;strong&gt;No Cache profile’s parameters&lt;/strong&gt;, to do that go to&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Administration &amp;gt; Settings &amp;gt; Advanced &amp;gt; System &amp;gt; Output Cache Settings &amp;gt; Page Cache Profiles &amp;gt; No Caching &amp;gt; Parameters and click Create new.
&lt;em&gt;(see the picture on top)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On the page that loads enter:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Key: setNoStore&lt;br/&gt;
Value: True&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now click on the &lt;strong&gt;No Caching Profile&lt;/strong&gt;, scroll to the bottom of the page and click the “&lt;strong&gt;Enabled&lt;/strong&gt;” checkbox, then &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now &lt;strong&gt;Sitefinity must be restarted&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This should fix the issue you are having.&lt;/p&gt;</content:encoded><category>cache</category><category>sitefinity</category><category>cms</category><author>Abhith Rajan</author></item><item><title>Sitefinity - Read localized resource labels in MVC widget</title><link>https://www.abhith.net/blog/sitefinity-read-localized-resource-labels-in-mvc-widget/</link><guid isPermaLink="true">https://www.abhith.net/blog/sitefinity-read-localized-resource-labels-in-mvc-widget/</guid><description>Explains how to get localized labels in Sitefinity MVC widgets.</description><pubDate>Thu, 07 Dec 2017 00:52:55 GMT</pubDate><content:encoded>&lt;p&gt;In your Razor View,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;@Html&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Resource&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ResourceLabel&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;ResourceName&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@Html.Resource(&amp;quot;ResourceLabel&amp;quot;, &amp;quot;ResourceName&amp;quot;)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above code, replace &lt;strong&gt;ResourceLabel&lt;/strong&gt; with the &lt;strong&gt;key&lt;/strong&gt; and &lt;strong&gt;ResourceName&lt;/strong&gt; with the &lt;strong&gt;type&lt;/strong&gt;, you used to create the label in the &lt;strong&gt;Sitefinity&lt;/strong&gt; CMS. Make sure &lt;strong&gt;Telerik.Sitefinity.Frontend.Mvc.Helpers&lt;/strong&gt; namespace is imported in the view. i.e&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;@using&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Telerik&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Sitefinity&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Frontend&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Mvc&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Helpers&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@using Telerik.Sitefinity.Frontend.Mvc.Helpers;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h4 id=&quot;sample-usage&quot;&gt;Sample usage&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#sample-usage&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;/&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;@Html.Resource(&amp;quot;Home&amp;quot;, &amp;quot;PageResources&amp;quot;)&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;li&gt;&lt;a href=&amp;quot;/&amp;quot;&gt;@Html.Resource(&amp;quot;Home&amp;quot;, &amp;quot;PageResources&amp;quot;)&lt;/a&gt;&lt;/li&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>sitefinity</category><category>cms</category><category>localization</category><author>Abhith Rajan</author></item><item><title>Visual Studio keeps crashing - First Aid</title><link>https://www.abhith.net/blog/visual-studio-keeps-crashing-first-aid/</link><guid isPermaLink="true">https://www.abhith.net/blog/visual-studio-keeps-crashing-first-aid/</guid><description>Things you can try to solve the random crashes of Visual Studio.</description><pubDate>Mon, 20 Nov 2017 11:46:59 GMT</pubDate><content:encoded>&lt;p&gt;Yesterday when I was working on a Sitefinity project in my Visual Studio 2017 (VS) community edition, the VS just hanged for few seconds and crashed. Ok, maybe because the file I tried to open was little big and CodeMaid may be tried to format it and so crashed, this was my initial thought. So I tried to open the Visual Studio from the Sitefinity Project Manager, and boom, it crashed during opening solution. Next, I tried to open Visual Studio directly without opening any solution and boom, it crashed again. i.e unable to open Visual Studio.&lt;/p&gt;
&lt;p&gt;Assuming that the crashes caused by any of the extensions that I installed (so many extensions installed to increase the productivity), I wanted to clear the cache of Visual Studio. To do that, I followed below steps,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Close Visual Studio&lt;/li&gt;
&lt;li&gt;Press Win + R and type %localappdata% and press Enter&lt;/li&gt;
&lt;li&gt;Navigate to Microsoft -&amp;gt; Visual Studio -&amp;gt; 15.0_[randomnumber] -&amp;gt; ComponentModelCache&lt;/li&gt;
&lt;li&gt;Delete everything in the above folder&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have ReSharper installed, to clear its project cache, followed the steps below&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make sure Visual Studio is closed&lt;/li&gt;
&lt;li&gt;Press Win + $ and type %localappdata% and press Enter&lt;/li&gt;
&lt;li&gt;Navigate to JetBrains -&amp;gt; Transient -&amp;gt; ReSharperPlatformVs15 -&amp;gt; v09_[randomnumber] (folder name depends on the ReSharper version installed).&lt;/li&gt;
&lt;li&gt;Delete ShellCaches and SolutionCaches folder&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And opened Visual Studio, it worked and I continued my work. But after some time, the same problem, VS hanged and crashed, and unable to open after. While I was trying to figure out what causes the issue, the boss called me to inform that I have a project demo for the Sitefinity project that I am working on to the client in 30min.&lt;/p&gt;
&lt;p&gt;Now it’s a real problem, How to run and demo the Sitefinity project when Visual Studio not working?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Plan A: Fix VisualStudio in 20 min. (10min for demo preparations).&lt;/li&gt;
&lt;li&gt;Plan B: Sitefinity project can run without VS by using its Project Manager.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I sticked with Plan A, tried the initial solution by cleaning cache and it didn’t worked this time. Next tried to open Visual Studio in Safe mode. To do that, followed below steps,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open Command Prompt&lt;/li&gt;
&lt;li&gt;Run command &lt;strong&gt;cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Run command &lt;strong&gt;Devenv.exe /SafeMode&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;/SafeMode&lt;/strong&gt; command is to start Visual Studio in safe mode, loading only the default environment and services.
And in safe mode, VisualStudio worked fine, so I uninstalled CodeMaid and some other extensions and closed VS to complete the uninstallation. Then I opened VS in normal mode and everything seemed fine.&lt;/p&gt;
&lt;p&gt;I opened the Sitefinity project and run build, prepared for the demo, and the demo went well. But when the client left, and I started to continue my work, the problem occurred again. So this time I tried to uninstall more extensions by going in SafeMode. And the problem keeps coming, sooner or later. And when I checked the &lt;strong&gt;ActivityLog.xml&lt;/strong&gt; for the visual studio in “&lt;strong&gt;C:\Users{username}\AppData\Roaming\Microsoft\VisualStudio\15.0_[randomnumber]&lt;/strong&gt;”, the errors reported is by the &lt;strong&gt;GitHub extension&lt;/strong&gt; and so next time I tried to &lt;strong&gt;revert&lt;/strong&gt; the GitHub extension (Cannot uninstall since its part of VS 2017) and disabled automatic updates.&lt;/p&gt;
&lt;p&gt;Now after did everything above, My Visual Studio running fine. So if you are troubling with any such situation, first check the &lt;strong&gt;ActivityLog.xml&lt;/strong&gt;. Hopefully, you will figure out whats going wrong with Visual Studio from the log.&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/99951/visual-studio-2017-version-153-crashes-when-openin.html?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=visual-studio-keeps-crashing-first-aid&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Visual studio 2017 version 15.3 crashes when opening solution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/visualstudio/ide/reference/safemode-devenv-exe?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=visual-studio-keeps-crashing-first-aid&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;/SafeMode (devenv.exe)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>visual-studio</category><category>ide</category><category>debug</category><author>Abhith Rajan</author></item><item><title>Markdown - Link within document</title><link>https://www.abhith.net/blog/markdown-link-within-document/</link><guid isPermaLink="true">https://www.abhith.net/blog/markdown-link-within-document/</guid><description>This is a short article on how to link within the document in a markdown (.md) file.</description><pubDate>Mon, 06 Nov 2017 09:39:53 GMT</pubDate><content:encoded>&lt;p&gt;I use markdown as the writing language for my blog posts on this website. It is clean and minimal so I prefer it over HTML.&lt;/p&gt;
&lt;p&gt;Today I updated some content in one of my blog posts, &lt;a href=&quot;https://www.abhith.net/blog/xamarin-development-problems-and-solutions/&quot;&gt;Xamarin development - problems and solutions&lt;/a&gt; and in which, there is a summary of issues listed on the top and the solutions for each of them explained below one by one and there wasn’t any link between the list items and the explanations.&lt;/p&gt;
&lt;p&gt;So for better usability, I had to link them, I know how to do it in &lt;strong&gt;HTML&lt;/strong&gt; and now I learned how to do it on &lt;strong&gt;Markdown&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To create the link,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;md&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--0td:underline;--1:#DBEDFF;--1td:underline;--2:#1D6F69&quot;&gt;Link text&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;](&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--0td:underline;--1:#E1E4E8;--1td:underline&quot;&gt;#some-id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;[Link text](#some-id)&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And add anchor point the target area by,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;md&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold;--2:#1D689E;--2fw:bold&quot;&gt;# &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold;--2:#5C6565;--2fw:bold&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--2:#1D689E;--2fw:bold&quot;&gt;&lt;span style=&quot;--0:#1E7734;--0fw:bold;--1:#85E89D;--1fw:bold&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--0fw:bold;--1:#B392F0;--1fw:bold;--2:#5C6565;--2fw:bold&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold;--2:#1D689E;--2fw:bold&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--0fw:bold;--1:#9ECBFF;--1fw:bold;--2:#1D6F69;--2fw:bold&quot;&gt;&amp;quot;some-id&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold;--2:#5C6565;--2fw:bold&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--0fw:bold;--1:#85E89D;--1fw:bold;--2:#1D689E;--2fw:bold&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold;--2:#5C6565;--2fw:bold&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--0fw:bold;--1:#79B8FF;--1fw:bold;--2:#1D689E;--2fw:bold&quot;&gt; DETAIL SECTION&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;# &lt;a name=&amp;quot;some-id&amp;quot;&gt;&lt;/a&gt; DETAIL SECTION&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Notice the usage of “&lt;em&gt;some-id&lt;/em&gt;” in both. You can replace “&lt;em&gt;some-id&lt;/em&gt;” with any proper text.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As you can see, we are adding an anchor tag (HTML element) to the &lt;strong&gt;Markdown&lt;/strong&gt; to make it work. Having HTML in markdown file is not that nice and some linters will complain about the same, this as a dirty hack.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;update-1---2nd-may-2019&quot;&gt;Update 1 - 2nd May 2019&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#update-1---2nd-may-2019&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you are using some kind of markdown transformer, there might be an option to make the header links automatically. Like &lt;strong&gt;gatsby-remark-autolink-headers&lt;/strong&gt; in case of &lt;strong&gt;Gatsby&lt;/strong&gt;.&lt;/p&gt;</content:encoded><category>markdown</category><category>gatsby</category><author>Abhith Rajan</author></item><item><title>JavaScript - Determine if user is on mobile device</title><link>https://www.abhith.net/blog/javascript-determine-if-user-is-on-mobile-device/</link><guid isPermaLink="true">https://www.abhith.net/blog/javascript-determine-if-user-is-on-mobile-device/</guid><description>You can use navigator.userAgent value to determine if the user is on a mobile device.</description><pubDate>Wed, 25 Oct 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In the responsive design era, you may want to do some extra operations if the user is on mobile, like something I mentioned in my last &lt;a href=&quot;https://www.abhith.net/blog/remove-specific-class-from-all-elements-jquery/&quot;&gt;post&lt;/a&gt; where my colleague wanted to remove some specific classes if the user is on mobile.&lt;/p&gt;
&lt;p&gt;To do that, you can check the &lt;strong&gt;navigator.userAgent&lt;/strong&gt; value. And with the help of &lt;strong&gt;regex&lt;/strong&gt; you can do,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;isMobile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--2:#BD2B28&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#DBEDFF&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#DBEDFF&quot;&gt;android&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#DBEDFF;--2:#BD2B28&quot;&gt;mobile&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#DBEDFF;--2:#BD2B28&quot;&gt;ip(hone&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;[oa]&lt;/span&gt;&lt;span style=&quot;--2:#BD2B28&quot;&gt;&lt;span style=&quot;--0:#032F62;--1:#DBEDFF&quot;&gt;d)&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;navigator&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;userAgent&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var isMobile = /android.+mobile|ip(hone|[oa]d)/i.test(navigator.userAgent);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;As you can see, we are matching against few of the major mobile user agents. But keep in mind that there are too many devices variants so user agents too, so if you need a more accurate result
may be &lt;a href=&quot;https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=javascript-determine-if-user-is-on-mobile-device&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; answer on &lt;strong&gt;SO&lt;/strong&gt; will be helpful.&lt;/p&gt;</content:encoded><category>javascript</category><author>Abhith Rajan</author></item><item><title>Remove specific class from all elements - jQuery</title><link>https://www.abhith.net/blog/remove-specific-class-from-all-elements-jquery/</link><guid isPermaLink="true">https://www.abhith.net/blog/remove-specific-class-from-all-elements-jquery/</guid><description>This a short article about how can we remove a specific class from all elements that do have the class easily using jQuery.</description><pubDate>Mon, 23 Oct 2017 10:16:21 GMT</pubDate><content:encoded>&lt;p&gt;Code first, talks later&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.class-name&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;removeClass&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;class-name&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;$(&amp;quot;.class-name&amp;quot;).removeClass(&amp;quot;class-name&amp;quot;);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In the above code, we are finding all the elements that do have the class and removing it.&lt;/p&gt;
&lt;h3 id=&quot;story-behind-this-post&quot;&gt;Story behind this post&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#story-behind-this-post&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Today my colleague asked me whether they can remove some specific class from whole elements who do have the class. Not just that, this has to be done only on mobile devices (post about &lt;strong&gt;Determine if the user is on the mobile device&lt;/strong&gt; is coming next). This post is to make his day a little easier.&lt;/p&gt;
&lt;h4 id=&quot;update&quot;&gt;Update&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#update&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The post &lt;a href=&quot;https://www.abhith.net/blog/javascript-determine-if-user-is-on-mobile-device/&quot;&gt;Determine if the user is on the mobile device&lt;/a&gt; is live now.&lt;/p&gt;</content:encoded><category>javascript</category><category>jquery</category><author>Abhith Rajan</author></item><item><title>Sitefinity Rookie Guide : Get Users in a Custom Role</title><link>https://www.abhith.net/blog/sitefinity-rookie-guide-get-users-in-a-custom-role/</link><guid isPermaLink="true">https://www.abhith.net/blog/sitefinity-rookie-guide-get-users-in-a-custom-role/</guid><description>To get users in a custom role, make sure to use the Role manager with Default Provider in Sitefinity.</description><pubDate>Sat, 21 Oct 2017 08:58:00 GMT</pubDate><content:encoded>&lt;p&gt;I am pretty new to &lt;strong&gt;Sitefinity&lt;/strong&gt; and started learning since one of the upcoming projects is need to be done in the Sitefinity.&lt;/p&gt;
&lt;p&gt;Now spent few days in a POC, in which one requirement is to list users in a custom role that we created. And it can be achieved easily using below code,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;roleMngr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;RoleManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Default&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;usersInCustomRole&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;roleMngr&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetUsersInRole&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;CustomRole&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;usersInCustomRole&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;userProfileManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;UserProfileManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;sitefinityProfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;userProfileManager&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetUserProfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;SitefinityProfile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var roleMngr = RoleManager.GetManager(&amp;quot;Default&amp;quot;);var usersInCustomRole = roleMngr.GetUsersInRole(&amp;quot;CustomRole&amp;quot;);foreach (var user in usersInCustomRole){    var userProfileManager = UserProfileManager.GetManager();    var sitefinityProfile = userProfileManager.GetUserProfile&lt;SitefinityProfile&gt;(user);    ...}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace the &lt;strong&gt;CustomRole&lt;/strong&gt; with the role name which you have created, in my case, it was &lt;strong&gt;Reviewer&lt;/strong&gt;. Since we want users in a custom role (i.e role which we created), we need to use the &lt;strong&gt;Default&lt;/strong&gt; provider.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The custom roles you created are part of the Default Provider.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In case of built-in roles, use &lt;strong&gt;AppRoles&lt;/strong&gt; as the provider name to get the role manager.&lt;/p&gt;</content:encoded><category>sitefinity</category><category>cms</category><author>Abhith Rajan</author></item><item><title>Git branch not showing in Visual Studio Team Explorer</title><link>https://www.abhith.net/blog/git-branch-not-showing-in-visual-studio-team-explorer/</link><guid isPermaLink="true">https://www.abhith.net/blog/git-branch-not-showing-in-visual-studio-team-explorer/</guid><description>If you are having trouble to see the newly created (remote) git branches in the Visual Studio Team Explorer, try the workaround provided in this article.</description><pubDate>Wed, 11 Oct 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In our company, all the projects source code is under source control, which is &lt;strong&gt;Visual Studio Online&lt;/strong&gt; (VSO). And most of them are using &lt;strong&gt;GIT&lt;/strong&gt; as the &lt;strong&gt;version control&lt;/strong&gt; (VSO supports Git as well as TFS).&lt;/p&gt;
&lt;p&gt;Last year I initiated to follow &lt;strong&gt;Git Flow&lt;/strong&gt; method as the branching model for the new projects and it’s going well. Colleagues are getting used to it.&lt;/p&gt;
&lt;p&gt;Recently when I created a feature branch in the VSO online interface, I checked the Visual Studio &lt;strong&gt;manage branches&lt;/strong&gt; window in the &lt;strong&gt;Team Explorer&lt;/strong&gt; to checkout the new branch but couldn’t find it there under &lt;strong&gt;Remote Branch&lt;/strong&gt;. The refresh button on the top of Team Explorer had no effect on the branches.&lt;/p&gt;
&lt;h3 id=&quot;workaround&quot;&gt;Workaround&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#workaround&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Until visual studio provides a better solution, you can use the &lt;strong&gt;SYNC&lt;/strong&gt; option in the &lt;strong&gt;Team Explorer&lt;/strong&gt;, which will also fetch the new branch list.&lt;/p&gt;
&lt;h4 id=&quot;useful&quot;&gt;Useful&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#useful&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;If you want to know more about &lt;strong&gt;Git Flow&lt;/strong&gt;, read this &lt;a href=&quot;http://nvie.com/posts/a-successful-git-branching-model/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=git-branch-not-showing-in-visual-studio-team-explorer&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt;.&lt;/p&gt;</content:encoded><category>git</category><category>visual-studio</category><category>ide</category><author>Abhith Rajan</author></item><item><title>Hunting security bugs in an old web application</title><link>https://www.abhith.net/blog/hunting-security-bugs-in-an-old-web-application/</link><guid isPermaLink="true">https://www.abhith.net/blog/hunting-security-bugs-in-an-old-web-application/</guid><description>In this post, I am sharing one of my security bug hunting experience in an older ASP.NET web form project.</description><pubDate>Mon, 09 Oct 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Recently one of our old (~4 years or so) website faced a big security challenge. A similar situation we faced for the same website a long time ago when it initially deployed to the production server, that time the site was hosted in &lt;strong&gt;&lt;a href=&quot;https://in.godaddy.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;GoDaddy&lt;/a&gt;&lt;/strong&gt;. Due to that incident, we moved the site to a custom VPS server with a third party company (where I worked during that time) and everything was fine after that.&lt;/p&gt;
&lt;p&gt;This year we moved the website to &lt;strong&gt;&lt;a href=&quot;http://www.everleap.com/a/oybnbo?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Everleap&lt;/a&gt;&lt;/strong&gt; and then recently the same problem happened, but after it happened, we brought the site back online within 5 minutes. Scheduled database backups and file backup were configured for the same which we do for all the sites we manage. &lt;strong&gt;&lt;a href=&quot;http://www.everleap.com/a/oybnbo?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Everleap&lt;/a&gt;&lt;/strong&gt; have a cloud backup service which will take care of the periodic backup of files as well as the databases.&lt;/p&gt;
&lt;p&gt;The site was configured to use &lt;strong&gt;&lt;a href=&quot;http://sucuri.net/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Sucuri&lt;/a&gt;&lt;/strong&gt; firewall but we didn’t have access to its portal, the client had. And IP security was enabled for the site so that only &lt;strong&gt;&lt;a href=&quot;http://sucuri.net/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Sucuri&lt;/a&gt;&lt;/strong&gt; IP’s are allowed to access the site. And the site content was managed by a custom CMS built by us in the old days, which hosted in a separate domain. After the issue stricken, we did couple of things,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Changed DB password.&lt;/li&gt;
&lt;li&gt;Cms access denied.&lt;/li&gt;
&lt;li&gt;Enabled all the Diagnostics modules in the &lt;strong&gt;&lt;a href=&quot;http://www.everleap.com/a/oybnbo?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Everleap&lt;/a&gt;&lt;/strong&gt; control panel. (HTTP Logging, Detailed Error Logging, Failed Request Tracing).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We blocked the CMS access to identify whether the CMS or the site is being compromised. Then the next day evening, the same thing happened. So we concluded that the website is being compromised. Next steps,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Changed DB password again.&lt;/li&gt;
&lt;li&gt;Code review&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;code-review&quot;&gt;Code review&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#code-review&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Code review went okay, the application was built on top of Web forms. And there were 3 areas where user input is taken,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Search&lt;/li&gt;
&lt;li&gt;Email Subscription&lt;/li&gt;
&lt;li&gt;Contact form&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In which Contact form input didn’t touch database since only email alert configured. So for the other two server-side input validation tightened. And we tried some ethical hacking attempts but all of them blocked by &lt;strong&gt;&lt;a href=&quot;http://sucuri.net/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Sucuri&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Checked the site security status in the &lt;a href=&quot;https://asafaweb.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Asafaweb&lt;/a&gt; and the result screenshot is given below,
 &lt;img src=&quot;https://www.abhith.net/_astro/2017-10-09-hunting-security-bugs-in-an-old-web-application-asafaweb-result.DISOBIZ2_ZJ6nXW.webp&quot; alt=&quot;asfaweb-result&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;987&quot; height=&quot;127&quot;&gt;
And did the recommended changes for the &lt;strong&gt;Request Validation&lt;/strong&gt;. All the updates deployed but in the same evening, it again happened.&lt;/p&gt;
&lt;h3 id=&quot;next-steps&quot;&gt;Next steps&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#next-steps&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since the project was kind of outdated, the manager asked us to estimate for the project migration into Umbraco since we couldn’t find anything suspicious in the coding, YET. So I delegated the estimation task to my colleague and started to look in the HTTP log downloaded from the &lt;strong&gt;&lt;a href=&quot;http://www.everleap.com/a/oybnbo?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hunting-security-bugs-in-an-old-web-application&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Everleap&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;turning-point&quot;&gt;Turning point&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#turning-point&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The log file contained 10k+ lines, my first search was for “POST” requests. While navigating through search results I noticed a get request with parameter contains web.config. The log for the same was,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2017-09-24 16:44:10 1990-15390 GET /PDF/DownLoad.aspx
fileName=../web.config&amp;amp;X-ARR-LOG-ID=1c936dd2-8679-42ad-b77c-da8a938059a4
80 xx-xxxxx-x-x-x-x-x—xx—x-x&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The above request was handled by the PDF download handler module, its intended function was to provide the requested PDF file.&lt;/p&gt;
&lt;p&gt;So I checked the request handler and its code given below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Page_Load&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;sender&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#AD4013&quot;&gt;EventArgs&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;fileName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Request&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;QueryString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;fileName&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ToString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;ContentType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;application/octet-stream&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;AddHeader&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Content-Disposition&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;attachment;filename=&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;fileName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;TransmitFile&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;( &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;fileName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Response&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;protected void Page_Load(object sender, EventArgs e){    string fileName = Request.QueryString[&amp;quot;fileName&amp;quot;].ToString();    Response.ContentType = &amp;quot;application/octet-stream&amp;quot;;    Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment;filename=&amp;quot; + fileName);    Response.TransmitFile( fileName);    Response.End();}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The above code is doing its intended function very well but it can do unintended function as well &lt;strong&gt;if you know what I mean&lt;/strong&gt;. To prove my point, I tried to invoke the same handler with the suspicious input and boom, here comes the requested file.&lt;/p&gt;
&lt;h3 id=&quot;final-steps&quot;&gt;Final steps&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#final-steps&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Removed the request handler, changed DB password again. After the bug patched, I checked the HTTP log again in the next day and found out that there is an exact same request but this time instead of 200, a 404 response. And now weeks passed, website working fine, so far so good.&lt;/p&gt;</content:encoded><category>aspnet-web-forms</category><category>security</category><category>web-config</category><author>Abhith Rajan</author></item><item><title>Get/Set hidden field value using jQuery</title><link>https://www.abhith.net/blog/get-set-hidden-field-value-using-jquery/</link><guid isPermaLink="true">https://www.abhith.net/blog/get-set-hidden-field-value-using-jquery/</guid><description>This article explains how to set and get hidden field value using jQuery.</description><pubDate>Sun, 01 Oct 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When we can achieve the same thing using many ways, with different frameworks, we tend to forget one or two such ways. Same thing happened to me. The task is simple, to set and get hidden field value in client side in a SharePoint project.&lt;/p&gt;
&lt;p&gt;Like I mentioned, it can be done easily using jQuery,&lt;/p&gt;
&lt;h3 id=&quot;set&quot;&gt;SET&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#set&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;#hiddenFieldControlId&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;valueToBeAssigned&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;$(&amp;quot;#hiddenFieldControlId&amp;quot;).val(valueToBeAssigned);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;get&quot;&gt;GET&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#get&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;hiddenFieldValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;#hiddenFieldControlId&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;var hiddenFieldValue = $(&amp;quot;#hiddenFieldControlId&amp;quot;).val();&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That’s it. Replace the &lt;strong&gt;hiddenFieldControlId&lt;/strong&gt; with the &lt;strong&gt;id&lt;/strong&gt; attribute value of your hidden field and make sure &lt;strong&gt;jQuery&lt;/strong&gt; referenced in the page.&lt;/p&gt;</content:encoded><category>javascript</category><category>jquery</category><category>aspnet-web-forms</category><author>Abhith Rajan</author></item><item><title>Redirect HTTPS requests to HTTP using IIS Rewrite rule in Web.Config</title><link>https://www.abhith.net/blog/redirect-https-requests-to-http-using-iis-rewrite-rule-in-webconfig/</link><guid isPermaLink="true">https://www.abhith.net/blog/redirect-https-requests-to-http-using-iis-rewrite-rule-in-webconfig/</guid><description>Use the provided rewrite rule to redirect HTTPS requests to HTTP.</description><pubDate>Thu, 28 Sep 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The below-given rewrite rule which redirects all the HTTPS request to its HTTP URL. Redirecting HTTPS to HTTP isn’t recommended considering many factors. If you don’t have SSL purchased for your website, there are some cool options, like &lt;strong&gt;Cloudflare&lt;/strong&gt;, it has a free package where it adds security to your site as well as provides free SSL, will write about it in a separate post.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect to HTTP&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;(.*)&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{HTTPS}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;^ON$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://{HTTP_HOST}/{R:1}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;redirectType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Permanent&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;rewrite&gt;  &lt;rules&gt;    &lt;rule name=&amp;quot;Redirect to HTTP&amp;quot; stopProcessing=&amp;quot;true&amp;quot;&gt;      &lt;match url=&amp;quot;(.*)&amp;quot; /&gt;      &lt;conditions&gt;        &lt;add input=&amp;quot;{HTTPS}&amp;quot; pattern=&amp;quot;^ON$&amp;quot; /&gt;      &lt;/conditions&gt;      &lt;action type=&amp;quot;Redirect&amp;quot; url=&amp;quot;http://{HTTP_HOST}/{R:1}&amp;quot; redirectType=&amp;quot;Permanent&amp;quot; /&gt;    &lt;/rule&gt;  &lt;/rules&gt;&lt;/rewrite&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded><category>iis</category><category>seo</category><category>web-config</category><category>rewrite-rule</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>Redirect HTTP to HTTPS using Web.Config in IIS</title><link>https://www.abhith.net/blog/redirect-http-to-https-using-webconfig-in-iis/</link><guid isPermaLink="true">https://www.abhith.net/blog/redirect-http-to-https-using-webconfig-in-iis/</guid><description>Use IIS Rewrite rule to redirect all HTTP request to HTTPS.</description><pubDate>Mon, 25 Sep 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;No Stories, just add the below rewrite rule in your &lt;strong&gt;Web.Config&lt;/strong&gt; under &lt;strong&gt;system.webServer&lt;/strong&gt; section so that &lt;strong&gt;IIS&lt;/strong&gt; will take care the redirection of HTTP requests to HTTPS.
Since we are about to add a rewrite rule in the IIS,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Before adding the rewrite rule, make sure that you installed the &lt;strong&gt;URL Rewrite&lt;/strong&gt; module in the IIS.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;httpsredirect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;(.*)&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{HTTPS}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;off&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;ignoreCase&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;redirectType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Permanent&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://yourdomain.com/{R:1}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;rewrite&gt;  &lt;rules&gt;    &lt;rule name=&amp;quot;httpsredirect&amp;quot; stopProcessing=&amp;quot;true&amp;quot;&gt;      &lt;match url=&amp;quot;(.*)&amp;quot; /&gt;      &lt;conditions&gt;        &lt;add input=&amp;quot;{HTTPS}&amp;quot; pattern=&amp;quot;off&amp;quot; ignoreCase=&amp;quot;true&amp;quot; /&gt;      &lt;/conditions&gt;      &lt;action type=&amp;quot;Redirect&amp;quot; redirectType=&amp;quot;Permanent&amp;quot; url=&amp;quot;https://yourdomain.com/{R:1}&amp;quot; /&gt;    &lt;/rule&gt;  &lt;/rules&gt;&lt;/rewrite&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace the &lt;strong&gt;yourdomain.com&lt;/strong&gt; with the actual domain name and you are good to go.&lt;/p&gt;</content:encoded><category>iis</category><category>seo</category><category>web-config</category><category>rewrite-rule</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>Redirect WWW to Non-WWW using Web.Config in IIS</title><link>https://www.abhith.net/blog/redirect-www-to-non-www-using-webconfig-in-iis/</link><guid isPermaLink="true">https://www.abhith.net/blog/redirect-www-to-non-www-using-webconfig-in-iis/</guid><description>Use IIS rewrite rule to redirect (301) all www requests to non-www.</description><pubDate>Tue, 19 Sep 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Code first, talks later.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect to non-www&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;(.*)&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;negate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://yourdomain.com/{R:1}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{HTTP_HOST}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;^yourdomain\.com$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;negate&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;rewrite&gt;  &lt;rules&gt;    &lt;rule name=&amp;quot;Redirect to non-www&amp;quot; stopProcessing=&amp;quot;true&amp;quot;&gt;      &lt;match url=&amp;quot;(.*)&amp;quot; negate=&amp;quot;false&amp;quot;&gt;&lt;/match&gt;      &lt;action type=&amp;quot;Redirect&amp;quot; url=&amp;quot;https://yourdomain.com/{R:1}&amp;quot;&gt;&lt;/action&gt;      &lt;conditions&gt;        &lt;add input=&amp;quot;{HTTP_HOST}&amp;quot; pattern=&amp;quot;^yourdomain\.com$&amp;quot; negate=&amp;quot;true&amp;quot;&gt;&lt;/add&gt;      &lt;/conditions&gt;    &lt;/rule&gt;  &lt;/rules&gt;&lt;/rewrite&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace the “yourdomain” with your domain name and add it under the &lt;strong&gt;system.webServer&lt;/strong&gt; section in the &lt;strong&gt;Web.Config&lt;/strong&gt;, and that’s it.&lt;/p&gt;
&lt;p&gt;Some people prefer www domain and some non-&lt;a href=&quot;http://www/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=redirect-www-to-non-www-using-webconfig-in-iis&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;www&lt;/a&gt;. I personally prefer www URLs. One important point to remember is never to allow both accessible at the same time. Read my article &lt;a href=&quot;https://www.abhith.net/blog/redirect-non-www-urls-to-www-urls/&quot;&gt;REDIRECT NON-WWW URLS TO WWW URLS&lt;/a&gt; to know why. It will be better if you add the rule on the &lt;strong&gt;Web.Release.config&lt;/strong&gt; with a slight modification. Read more about it on my article &lt;a href=&quot;https://www.abhith.net/blog/inserting-rewrite-rule-in-release-config/&quot;&gt;INSERTING REWRITE RULE IN RELEASE CONFIG&lt;/a&gt;.&lt;/p&gt;</content:encoded><category>iis</category><category>seo</category><category>web-config</category><category>rewrite-rule</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>Determine Total Number of Open/Active Connections in MS SQL Server</title><link>https://www.abhith.net/blog/determine-total-number-of-open-active-connections-in-ms-sql-server/</link><guid isPermaLink="true">https://www.abhith.net/blog/determine-total-number-of-open-active-connections-in-ms-sql-server/</guid><description>This article contains a SQL query which can be used to determine the total number of open/active connections in MS SQL Server. Also explains, how to solve the error &quot;Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.&quot;</description><pubDate>Sat, 16 Sep 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This article contains a SQL query which can be used to determine the total number of open/active connections in MS SQL Server.
Also explains, how to solve the error “Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.”&lt;/p&gt;
&lt;p&gt;Recently we migrated one of our application from one VPS server to another. Initially, everything was fine. After a day or so here comes a strange error.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Timeout expired. The timeout period elapsed prior to obtaining a connection from
the pool. This may have occurred because all pooled connections were in use
and max pool size was reached.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The connection string doesn’t have any custom value set for &lt;strong&gt;Max Pool Size&lt;/strong&gt;. So the maximum pool size for the application was the default, i.e 100. To check whether the DB have this much open connection, we run the following query in the SQL Management Studio,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;sql&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;DB_NAME&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;dbid&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; DBName,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#1D689E&quot;&gt;COUNT&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;dbid&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; NumberOfConnections,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;loginame &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; LoginName&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#AD4013&quot;&gt;sysprocesses&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;dbid&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF;--2:#B22E6E&quot;&gt;0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;GROUP BY&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;dbid&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, loginame&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;SELECT    DB_NAME(dbid) as DBName,    COUNT(dbid) as NumberOfConnections,    loginame as LoginNameFROM    sys.sysprocessesWHERE    dbid &gt; 0GROUP BY    dbid, loginame&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This will list all the DB’s and its number of open connections grouped by login name. For us, the number of open connection for the DB was ~100 that’s why the error. So we updated the connection string to have &lt;strong&gt;Max Pool Size=200&lt;/strong&gt;. And the application worked fine. Sample connection string with &lt;strong&gt;Max Pool Size&lt;/strong&gt; given below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;connectionString&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Server=YOUR_SERVER;Database=YOUR_DB_NAME;User Id=YOUR_DB_USER_ID;Password=YOUR_DB_USER_PASSWORD;Max Pool Size=200;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Default&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;providerName&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;System.Data.SqlClient&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;add connectionString=&amp;quot;Server=YOUR_SERVER;Database=YOUR_DB_NAME;User Id=YOUR_DB_USER_ID;Password=YOUR_DB_USER_PASSWORD;Max Pool Size=200;&amp;quot; name=&amp;quot;Default&amp;quot; providerName=&amp;quot;System.Data.SqlClient&amp;quot; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Few things to remember in this kind of situations are,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In your code, make sure all the connections are closed when finished usage.&lt;/li&gt;
&lt;li&gt;Don’t set Max Pool Size to a very large value unless it is necessary.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>entity-framework</category><category>sql-server</category><author>Abhith Rajan</author></item><item><title>Check if string is Arabic - C#</title><link>https://www.abhith.net/blog/check-if-string-is-arabic-csharp/</link><guid isPermaLink="true">https://www.abhith.net/blog/check-if-string-is-arabic-csharp/</guid><description>In one simple line of code, we can check whether the given string is Arabic or not, in C#.</description><pubDate>Wed, 06 Sep 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I have pretty good experience in bilingual web app development, especially in English &amp;amp; Arabic languages. The challenge with switching website page from English to Arabic is not just the content translation, the whole layout needs to be changed and the text direction for all need to be RTL whereas for English it needs to be LTR.&lt;/p&gt;
&lt;p&gt;We developed this one app &lt;a href=&quot;https://socialboard.io/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=check-if-string-is-arabic-csharp&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;socialboard&lt;/a&gt; which aggregates content from social media and displays in a single place. Initially, we focused only on English content so everything in LTR even though some aggregated content was in Arabic. But then we got some clients whose primary language is Arabic. i.e most of the content of their social media was in Arabic.&lt;/p&gt;
&lt;p&gt;So we had to do some changes, the UX team prepared the RTL layout for displaying content. The development team had to classify content (i.e to flag them isRTL or not) during creation and use proper layout based on isRTL field value of the content.&lt;/p&gt;
&lt;p&gt;To classify, or to check whether the given content language is Arabic or not, we used the following extension method,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;/// &amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E;--2fs:italic&quot;&gt;summary&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;/// To check whether the given string is Arabic.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;/// &amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E;--2fs:italic&quot;&gt;summary&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;/// &amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E;--2fs:italic&quot;&gt;param&lt;/span&gt;&lt;span style=&quot;--2:#5C6565;--2fs:italic&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69;--2fs:italic&quot;&gt;&amp;quot;input&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E;--2fs:italic&quot;&gt;param&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;/// &amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E;--2fs:italic&quot;&gt;returns&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;gt;Returns True if Arabic&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E;--2fs:italic&quot;&gt;returns&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;IsRtl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Regex&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;IsMatch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;@&amp;quot;\p{IsArabic}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;/// &lt;summary&gt;/// To check whether the given string is Arabic./// &lt;/summary&gt;/// &lt;param name=&amp;quot;input&amp;quot;&gt;&lt;/param&gt;/// &lt;returns&gt;Returns True if Arabic&lt;/returns&gt;public static bool IsRtl(this string input){    return Regex.IsMatch(input, @&amp;quot;\p{IsArabic}&amp;quot;);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And it is now part of my &lt;a href=&quot;https://github.com/Abhith/Code.Library&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Code.Library&lt;/a&gt; package ValidationHelper module.&lt;/p&gt;
&lt;p&gt;If you know any better way to check if the string is &lt;strong&gt;Arabic in C#&lt;/strong&gt;, let me know in the comments.&lt;/p&gt;</content:encoded><category>aspnet</category><category>localization</category><category>c-sharp</category><author>Abhith Rajan</author></item><item><title>Xamarin development - problems and solutions</title><link>https://www.abhith.net/blog/xamarin-development-problems-and-solutions/</link><guid isPermaLink="true">https://www.abhith.net/blog/xamarin-development-problems-and-solutions/</guid><description>Here I am listing the problems that I faced during mobile app development using Xamarin (Now focused on Xamarin Forms) and the solutions that worked for me.</description><pubDate>Sat, 02 Sep 2017 09:58:00 GMT</pubDate><content:encoded>&lt;p&gt;Following are the list of problems I am addressing here.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#1&quot;&gt;#1: &lt;strike&gt;No resource found that matches the given name “Theme.AppCompat.Light” and similar 100+ errors during build.&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#2&quot;&gt;#2: &lt;strike&gt;Couldn’t able to sign into my Xamarin account from visual studio 2017 preview.&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#3&quot;&gt;#3: &lt;strike&gt;Packaging error - “jarsigner.exe” exited with code 1&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#4&quot;&gt;#4: &lt;strike&gt;Project not selected to build for this solution configuration&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#5&quot;&gt;#5: &lt;strike&gt;GoogleServicesJson BuildAction missing&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#6&quot;&gt;#6: &lt;strike&gt;App runs in debug mode, crashes in release mode&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#7&quot;&gt;#7: &lt;strike&gt;Input string was not in a correct format - XAML&lt;/strike&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The strikethrough indicates that I have found solutions for them.
Solutions that worked for me explained below,&lt;/p&gt;
&lt;h4 id=&quot;solution-for-1-no-resource-found-that-matches-the-given-name-themeappcompatlight-and-similar-100-errors-during-build&quot;&gt;&lt;a name=&quot;1&quot;&gt;&lt;/a&gt;Solution for #1: No resource found that matches the given name “Theme.AppCompat.Light” and similar 100+ errors during build.&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-1-no-resource-found-that-matches-the-given-name-themeappcompatlight-and-similar-100-errors-during-build&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To solve this, I deleted the Xamarin directory in this path C:\Users\username\AppData\Local\ then opened the solution, rebuild and it worked.&lt;/p&gt;
&lt;h5 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://forums.xamarin.com/discussion/59017/no-resource-found-that-matches-the-given-name-theme-appcompat-light?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=xamarin-development-problems-and-solutions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;No resource found that matches the given name “Theme.AppCompat.Light”&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;solution-for-2-couldnt-able-to-sign-into-my-xamarin-account-from-visual-studio-2017-preview&quot;&gt;&lt;a name=&quot;2&quot;&gt;&lt;/a&gt;Solution for #2: Couldn’t able to sign into my Xamarin account from visual studio 2017 preview.&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-2-couldnt-able-to-sign-into-my-xamarin-account-from-visual-studio-2017-preview&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;I was trying login in VS 2017 Preview 15.4.0 and it wasn’t working. After adding the Xamarin related feature pack to my 15.3.3 stable VS 2017, I tried the login in it and it worked. Then checked the login status in VS preview and that was also in the same state as in the stable.&lt;/p&gt;
&lt;h5 id=&quot;update-1&quot;&gt;Update 1:&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#update-1&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;I reported the problem #2 to VisualStudio developer community and here is the &lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/106582/unable-to-sign-in-to-xamarin-account-unhandled-act.html?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=xamarin-development-problems-and-solutions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;solution-for-3-packaging-error---jarsignerexe-exited-with-code-1&quot;&gt;&lt;a name=&quot;3&quot;&gt;&lt;/a&gt;Solution for #3: Packaging error - “jarsigner.exe” exited with code 1&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-3-packaging-error---jarsignerexe-exited-with-code-1&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Updated Xamarin.Forms from 2.3.4.247 to 2.3.4.270. Restarted visual studio. Changed configuration to Release. Tried to deploy and it worked. Switched back to Debug configuration and rerun. And it too worked.&lt;/p&gt;
&lt;h4 id=&quot;solution-for-4-project-not-selected-to-build-for-this-solution-configuration&quot;&gt;&lt;a name=&quot;4&quot;&gt;&lt;/a&gt;Solution for #4: Project not selected to build for this solution configuration&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-4-project-not-selected-to-build-for-this-solution-configuration&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Found the solution, check your configuration manager and make sure that the “Deploy” box is checked for your target platform. The configuration manager can be found by selecting it from the drop-down arrow next to “Debug”.&lt;/p&gt;
&lt;h5 id=&quot;additional-resources-1&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-1&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://forums.xamarin.com/discussion/67216/skipped-deploy-configuration-debug-any-cpu-project-not-selected-to-build-for-this-solution-conf?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=xamarin-development-problems-and-solutions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Skipped Deploy: Configuration: Debug Any CPU Project not selected to build for this solution conf.&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;solution-for-5-googleservicesjson-buildaction-missing&quot;&gt;&lt;a name=&quot;5&quot;&gt;&lt;/a&gt;Solution for #5: GoogleServicesJson BuildAction missing&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-5-googleservicesjson-buildaction-missing&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This is the second time I came across this problem. When adding Firebase crash reporting component to our Xamarin forms app, we need to add the &lt;strong&gt;google-services.json&lt;/strong&gt; file to the project as well needs to set its build action to “&lt;strong&gt;GoogleServicesJson&lt;/strong&gt;”. But after adding the file, when checked the available build actions for the file, there is no “&lt;strong&gt;GoogleServicesJson&lt;/strong&gt;”. In that case, unload the project and then edit the “&lt;strong&gt;.csproj&lt;/strong&gt;” file and add the following.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;ItemGroup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;GoogleServicesJson&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;Include&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;google-services.json&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;ItemGroup&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;ItemGroup&gt;  &lt;GoogleServicesJson Include=&amp;quot;google-services.json&amp;quot; /&gt;&lt;/ItemGroup&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Then reload the project. That’s it. Check the build action for the file and you can see that it is set to &lt;strong&gt;GoogleServicesJson&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;solution-for-6-app-runs-in-debug-mode-crashes-in-release-mode&quot;&gt;&lt;a name=&quot;6&quot;&gt;&lt;/a&gt;Solution for #6: App runs in debug mode, crashes in release mode&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-6-app-runs-in-debug-mode-crashes-in-release-mode&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;When this issue occurred to me, I thought it is because of any configuration mistakes in my Release configuration but the issue solved by a simple process which is &lt;strong&gt;Clean&lt;/strong&gt; the solution and rebuild.&lt;/p&gt;
&lt;h5 id=&quot;additional-resources-2&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-2&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://forums.xamarin.com/discussion/55666/app-runs-in-debug-mode-crashes-in-release-mode?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=xamarin-development-problems-and-solutions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;App runs in debug mode, crashes in release mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;solution-for-7-input-string-was-not-in-a-correct-format---xaml&quot;&gt;&lt;a name=&quot;7&quot;&gt;&lt;/a&gt;Solution for #7: Input string was not in a correct format - XAML&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#solution-for-7-input-string-was-not-in-a-correct-format---xaml&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This was purely my mistake but it took time to figure it out, especially when your XAML contains more elements. The issue was, the parameter I passed to one of the element’s attribute was wrong, i.e more specifically, I passed some hashcode value of some color to one element HeightRequest attribute which should be an integer. There is no warning or anything in VisualStudio to indicate the syntax error and the error during the build is just “&lt;strong&gt;Input string was not in a correct format&lt;/strong&gt;” pointing to the file.&lt;/p&gt;
&lt;h5 id=&quot;additional-resources-3&quot;&gt;Additional Resources&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#additional-resources-3&quot;&gt;#&lt;/a&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://forums.xamarin.com/discussion/55485/input-string-was-not-in-a-correct-format?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=xamarin-development-problems-and-solutions&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;Input string was not in a correct format&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>visual-studio</category><category>xamarin-forms</category><author>Abhith Rajan</author></item><item><title>Best Umbraco Packages</title><link>https://www.abhith.net/blog/best-umbraco-packages/</link><guid isPermaLink="true">https://www.abhith.net/blog/best-umbraco-packages/</guid><description>My personal favorite list of packages I use when I build a Umbraco website.</description><pubDate>Thu, 24 Aug 2017 22:23:43 GMT</pubDate><content:encoded>&lt;p&gt;There are so many free/paid packages available for Umbraco. Following are few of them which really suits our needs.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Diplo Trace Log Viewer&lt;/li&gt;
&lt;li&gt;Url Tracker&lt;/li&gt;
&lt;li&gt;Articulate&lt;/li&gt;
&lt;li&gt;Robots.txt Editor&lt;/li&gt;
&lt;li&gt;Analytics&lt;/li&gt;
&lt;li&gt;Diplo Audit Log Viewer&lt;/li&gt;
&lt;li&gt;RankOne - SEO Toolkit&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;diplo-trace-log-viewer&quot;&gt;Diplo Trace Log Viewer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#diplo-trace-log-viewer&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/trace-logs-w.Cea68sJz_2oIag2.webp&quot; alt=&quot;diplo trace log viewer&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1366&quot; height=&quot;648&quot;&gt;&lt;figcaption&gt;diplo trace log viewer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Whenever you have issues with Umbraco websites, you first check its logs. To get logs, you need access to the hosting server and you open the log file in some editor and Ctrl+F for “Error”. We too did the same before we found Diplo Trace Log Viewer.&lt;/p&gt;
&lt;p&gt;After installing Diplo Trace Log Viewer, viewing logs is so easy. You sign in to Umbraco, there in the developer tree like in the picture you get a new menu “Trace Logs”. There you can find all the logs, and the filters are so easy so that no more Ctrl+F.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/developer-tools/diplo-trace-log-viewer/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;url-tracker&quot;&gt;Url Tracker&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#url-tracker&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/url-tracker.DuSJgLDM_k88HU.webp&quot; alt=&quot;url tracker&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1366&quot; height=&quot;648&quot;&gt;&lt;figcaption&gt;url tracker&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Url Tracker is so helpful to manage the URLs in your Umbraco website. Before we aware of the Url Tracker, we used to write redirect rules in the IIS and it is not easy and it sometimes leads to “too many redirects”.&lt;/p&gt;
&lt;p&gt;Once we add Url Tracker package, we can add redirect rules from Umbraco interface, also the module keeps tracks of 404 requests, later you can add redirect rules based on these records as well.&lt;/p&gt;
&lt;p&gt;The 404 module is so helpful when you are migrating an old website to Umbraco hence the routing definitions changed, so old website links end up in 404. Which you are tracking and later you can map it to the new link in the site using the URL tracker.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/developer-tools/301-url-tracker/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;articulate&quot;&gt;Articulate&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#articulate&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/articulate.B47uF0ln_ZDmnyl.webp&quot; alt=&quot;articulate&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1366&quot; height=&quot;648&quot;&gt;&lt;figcaption&gt;articulate&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;One of the best blog engine you can attach to your Umbraco website. Install it and modify any of the included themes to your taste and that’s it. Features include categories, tags, markdown support etc.&lt;/p&gt;
&lt;p&gt;You can modify every part of it according to your needs, just like I did for this website. Now it available as a NuGet package.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/starter-kits/articulate/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&quot;robotstxt-editor&quot;&gt;Robots.txt Editor&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#robotstxt-editor&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/robots-txt.uU0-rdi2_Z11b7Gn.webp&quot; alt=&quot;robots-txt&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1365&quot; height=&quot;628&quot;&gt;&lt;figcaption&gt;robots-txt&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Another Developer tree module which enables you to edit your robots.txt inside from your Umbraco section.It adds a basic robots.txt file during installation if your site doesn’t have any.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/developer-tools/robotstxt-editor?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;analytics&quot;&gt;Analytics&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#analytics&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/analytics.B_leNPFr_H08ou.webp&quot; alt=&quot;analytics&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1366&quot; height=&quot;648&quot;&gt;&lt;figcaption&gt;analytics&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If you want to keep track of your google analytics inside from your Umbraco site, this is the package you are looking for. It retrieves your site analytics data from Google analytics.&lt;/p&gt;
&lt;p&gt;Installing the package will add a new section in your Umbraco. Make sure to check user permissions if you don’t see the new section. The section contains a menu tree with various analytics data including some charts and so on.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/backoffice-extensions/analytics/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;diplo-audit-log-viewer&quot;&gt;Diplo Audit Log Viewer&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#diplo-audit-log-viewer&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/audit-log-viewer-2.BbCxHJi6_2bMF4v.webp&quot; alt=&quot;audit log viewer&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1365&quot; height=&quot;626&quot;&gt;&lt;figcaption&gt;audit log viewer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If your Umbraco site has multiple users, to see whats going on, this is the best option. It will list the activities of the CMS users so that you can oversee.&lt;/p&gt;
&lt;p&gt;You will find the audit logs menu under the developer section once you install the package.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/developer-tools/diplo-audit-log-viewer/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;rankone---seo-toolkit&quot;&gt;RankOne - SEO Toolkit&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#rankone---seo-toolkit&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/Rankone.ByCsT_Hu_Z1GF7AT.webp&quot; alt=&quot;rankone&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1366&quot; height=&quot;648&quot;&gt;&lt;figcaption&gt;rankone&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This package has a collection of SEO tools. It contains a doc type composition contains the title, meta description, and meta keywords. Adding that composition to any of the existing document types adds a new SEO tab for the document type. It also includes a partial view where you can see the code to get the meta data for the content.&lt;/p&gt;
&lt;p&gt;What I did was, after installed, added the composition to my home and about pages. And added the code from the partial view to my master page. And it working fine.&lt;/p&gt;
&lt;p&gt;The package also adds a dashboard section in the content home. Where you can evaluate the existing pages SEO metrics and it will list improvement points.&lt;/p&gt;
&lt;p&gt;Find the package and read about its features &lt;a href=&quot;https://our.umbraco.org/projects/backoffice-extensions/rankone-seo-toolkit/https://our.umbraco.org/projects/backoffice-extensions/rankone-seo-toolkit/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=best-umbraco-packages&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;paid-tools&quot;&gt;Paid Tools&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#paid-tools&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;While the packages above are free, there are also some paid tools that might be worth considering for your Umbraco projects.&lt;/p&gt;
&lt;h4 id=&quot;byteeditornet&quot;&gt;ByteEditor.net&lt;a class=&quot;heading-anchor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#byteeditornet&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://byteeditor.net?utm_source=www.abhith.net&amp;amp;utm_medium=website&amp;amp;utm_campaign=blog&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;ByteEditor&lt;/a&gt; is a premium visual website builder designed specifically for Umbraco CMS, offering a robust set of features to enhance the website creation process. With its drag-and-drop interface, extensive template library, it provides a feature-rich editing experience that goes beyond traditional code editors. The platform caters to both Umbraco developers and non-technical users, allowing for the creation of professional websites without the need for coding. While I haven’t personally reviewed this yet, it has been recommended as a potential option for Umbraco developers. If you’re looking for a more feature-rich editing experience and don’t mind paying for it, this might be worth exploring.&lt;/p&gt;
&lt;p&gt;I will continue updating this list and this is the first post in my &lt;a href=&quot;https://www.abhith.net/topics/awesome-list&quot;&gt;Awesome Lists&lt;/a&gt; topic.&lt;/p&gt;</content:encoded><category>umbraco</category><category>awesome-list</category><category>cms</category><author>Abhith Rajan</author></item><item><title>Set selected option by value via jQuery</title><link>https://www.abhith.net/blog/set-selected-option-by-value-via-jquery/</link><guid isPermaLink="true">https://www.abhith.net/blog/set-selected-option-by-value-via-jquery/</guid><description>This article describes how to set the selected option in a select by its value via jQuery.</description><pubDate>Sat, 19 Aug 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In one of my projects, there is a search page which has few filters including linked selects, i.e the options displayed in a child select is dependent upon the option selected in another (parent). (like when we choose a country (parent), we have to show the states under the selected country in the child.)&lt;/p&gt;
&lt;p&gt;After selecting both select, when we submit the search, it loads search result page with same filters above. The problem is that the child select value is not retained. Since when we assign the parent select selected value, it will trigger an ajax call and its response is bound to the child select.&lt;/p&gt;
&lt;p&gt;To retain the filters as users selected, we had to set the selected value in the child select also. My child select is (Razor)&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;@Html&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;DropDownList&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;childSelectName&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;items&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;@name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;someName&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; })&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@Html.DropDownList(&amp;quot;childSelectName&amp;quot;, items, new { @name = &amp;quot;someName&amp;quot; })&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And inside my ajax call on parent select on change, after binding all the available option to the child select,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;selectedChildItemId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;#childSelectName&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;selectedChildItemId&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;if (selectedChildItemId) {  $(&amp;quot;#childSelectName&amp;quot;).val(selectedChildItemId);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In short,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;#Controls_ID&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;$(&amp;quot;#Controls_ID&amp;quot;).val(value);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Replace the &lt;em&gt;Controls_ID&lt;/em&gt; with your select tag Id and &lt;em&gt;value&lt;/em&gt; with the selected item value.&lt;/p&gt;</content:encoded><category>javascript</category><category>jquery</category><author>Abhith Rajan</author></item><item><title>Umbraco Get Current Page in Partial View</title><link>https://www.abhith.net/blog/umbraco-get-current-page-in-partial-view/</link><guid isPermaLink="true">https://www.abhith.net/blog/umbraco-get-current-page-in-partial-view/</guid><description>This article describes how to get the CurrentPage of Umbraco in a partial view.</description><pubDate>Fri, 18 Aug 2017 10:02:00 GMT</pubDate><content:encoded>&lt;p&gt;In my website, the header section is a partial view which basically contains the header menus. The menus initially were same for all the pages across my site but I thought to hide some menu in case the current page is not the homepage.&lt;/p&gt;
&lt;p&gt;To do that, I needed to get the current page and check whether the current page is the homepage or not, in the header partial.&lt;/p&gt;
&lt;p&gt;To get the current page in partial view,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;@inherits&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;UmbracoTemplatePage&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;@{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#53676E;--2fw:bold&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--2:#54666C&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;currentPage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Umbraco&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;Content&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;umbraco&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;NodeFactory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Node&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;GetCurrent&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;Id&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@inherits UmbracoTemplatePage@{    var currentPage = Umbraco.Content(umbraco.NodeFactory.Node.GetCurrent().Id);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And to check whether it is home page or not, I decided to compare against DocumentTypeAlias as shown below,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;cs&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;@if&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;currentPage&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;DocumentTypeAlias&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583;--2:#5B6900&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;home&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;// some code&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@if (currentPage.DocumentTypeAlias == &amp;quot;home&amp;quot;){     // some code&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And it works.&lt;/p&gt;</content:encoded><category>umbraco</category><category>cms</category><author>Abhith Rajan</author></item><item><title>Event tracking with Google Analytics</title><link>https://www.abhith.net/blog/event-tracking-with-google-analytics/</link><guid isPermaLink="true">https://www.abhith.net/blog/event-tracking-with-google-analytics/</guid><description>When you want to get metrics related to user interactions on various parts of your website Google Analytics (ga)  event tracking can be helpful and is easy to integrate as well.</description><pubDate>Thu, 17 Aug 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I hope you have already added google analytics tracking script in your master page. If not see the page source of this page and check at the bottom of the page, there you can see some script which is provided by google analytics when we add a website (property) to our account in Google analytics which will track the page views etc for the whole website.&lt;/p&gt;
&lt;p&gt;To add event tracking, we need to trigger the following function,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ga&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;send&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;event&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;eventCategory&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;eventAction&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;eventLabel&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;eventValue&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#1D689E&quot;&gt;fieldsObject&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;ga(  &amp;quot;send&amp;quot;,  &amp;quot;event&amp;quot;,  [eventCategory],  [eventAction],  [eventLabel],  [eventValue],  [fieldsObject]);&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In which,&lt;strong&gt;[eventCategory]&lt;/strong&gt; and &lt;strong&gt;[eventAction]&lt;/strong&gt; are required fields.&lt;/p&gt;
&lt;p&gt;Example usage follows,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;a&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;tel:1800123456&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;onclick&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#1D689E&quot;&gt;ga&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;(&amp;#39;send&amp;#39;, &amp;#39;event&amp;#39;, &amp;#39;Phone Call&amp;#39;, &amp;#39;Click/Touch&amp;#39;, &amp;#39;Contact Page&amp;#39;);&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;1800123456&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;a&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;a  href=&amp;quot;tel:1800123456&amp;quot;  onclick=&amp;quot;ga(&apos;send&apos;, &apos;event&apos;, &apos;Phone Call&apos;, &apos;Click/Touch&apos;, &apos;Contact Page&apos;);&amp;quot;  &gt;1800123456&lt;/a&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The above code will track user interaction with the phone number. As you can see, here the &lt;strong&gt;eventCategory&lt;/strong&gt; is “Phone Call”, and &lt;strong&gt;eventAction&lt;/strong&gt; is “Click/Touch”. We can use the &lt;strong&gt;eventLabel&lt;/strong&gt; field to improve the metrics by like here is assigned with value “Contact Page” so that we knows how much triggered from that page itself. And for other pages, we can have different eventLabel.&lt;/p&gt;</content:encoded><category>analytics</category><category>seo</category><author>Abhith Rajan</author></item><item><title>Inserting Rewrite rule in Release Config</title><link>https://www.abhith.net/blog/inserting-rewrite-rule-in-release-config/</link><guid isPermaLink="true">https://www.abhith.net/blog/inserting-rewrite-rule-in-release-config/</guid><description>Adding rewrite rule in release config is handy so that it will not affect during Debug mode.</description><pubDate>Sat, 12 Aug 2017 10:48:30 GMT</pubDate><content:encoded>&lt;p&gt;My Web.config’s system.webServer section initially looked like this,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;....&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--If you wish to use IIS rewrite rules,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;see the documentation here:https://our.umbraco.org/documentation/Reference/Routing/IISRewriteRules--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--&amp;lt;rewrite&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;rules&amp;gt;&amp;lt;/rules&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;/rewrite&amp;gt; --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;system.webServer&gt;....&lt;!--If you wish to use IIS rewrite rules,see the documentation here:https://our.umbraco.org/documentation/Reference/Routing/IISRewriteRules--&gt; &lt;!--&lt;rewrite&gt;  &lt;rules&gt;&lt;/rules&gt;     &lt;/rewrite&gt; --&gt;&lt;/system.webServer&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And my Web.Release.config looked like this,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; encoding&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xmlns:xdt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://schemas.microsoft.com/XML-Document-Transform&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;In the example below, the &amp;quot;SetAttributes&amp;quot; transform will change the value of&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;quot;connectionString&amp;quot; to use &amp;quot;ReleaseSQLServer&amp;quot; only when the &amp;quot;Match&amp;quot; locator&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;finds an attribute &amp;quot;name&amp;quot; that has a value of &amp;quot;MyDB&amp;quot;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;connectionStrings&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;add name=&amp;quot;MyDB&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;connectionString=&amp;quot;Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;xdt:Transform=&amp;quot;SetAttributes&amp;quot; xdt:Locator=&amp;quot;Match(name)&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;/connectionStrings&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.web&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;compilation&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xdt:Transform&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;RemoveAttributes(debug)&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;In the example below, the &amp;quot;Replace&amp;quot; transform will replace the entire&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;customErrors&amp;gt; section of your web.config file.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;Note that because there is only one customErrors section under the&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;system.web&amp;gt; node, there is no need to use the &amp;quot;xdt:Locator&amp;quot; attribute.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;customErrors defaultRedirect=&amp;quot;GenericError.htm&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;mode=&amp;quot;RemoteOnly&amp;quot; xdt:Transform=&amp;quot;Replace&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;error statusCode=&amp;quot;500&amp;quot; redirect=&amp;quot;InternalError.htm&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;/customErrors&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.web&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&gt;&lt;!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 --&gt;&lt;configuration xmlns:xdt=&amp;quot;http://schemas.microsoft.com/XML-Document-Transform&amp;quot;&gt;  &lt;!--    In the example below, the &amp;quot;SetAttributes&amp;quot; transform will change the value of    &amp;quot;connectionString&amp;quot; to use &amp;quot;ReleaseSQLServer&amp;quot; only when the &amp;quot;Match&amp;quot; locator    finds an attribute &amp;quot;name&amp;quot; that has a value of &amp;quot;MyDB&amp;quot;.    &lt;connectionStrings&gt;      &lt;add name=&amp;quot;MyDB&amp;quot;        connectionString=&amp;quot;Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True&amp;quot;        xdt:Transform=&amp;quot;SetAttributes&amp;quot; xdt:Locator=&amp;quot;Match(name)&amp;quot;/&gt;    &lt;/connectionStrings&gt;  --&gt;  &lt;system.web&gt;    &lt;compilation xdt:Transform=&amp;quot;RemoveAttributes(debug)&amp;quot; /&gt;    &lt;!--      In the example below, the &amp;quot;Replace&amp;quot; transform will replace the entire      &lt;customErrors&gt; section of your web.config file.      Note that because there is only one customErrors section under the      &lt;system.web&gt; node, there is no need to use the &amp;quot;xdt:Locator&amp;quot; attribute.      &lt;customErrors defaultRedirect=&amp;quot;GenericError.htm&amp;quot;        mode=&amp;quot;RemoteOnly&amp;quot; xdt:Transform=&amp;quot;Replace&amp;quot;&gt;        &lt;error statusCode=&amp;quot;500&amp;quot; redirect=&amp;quot;InternalError.htm&amp;quot;/&gt;      &lt;/customErrors&gt;    --&gt;  &lt;/system.web&gt;&lt;/configuration&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Now I have to add a rule which redirects all non-www requests to www route. I accomplished the same by modifying the Web.config to,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;....&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--If you wish to use IIS rewrite rules,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;see the documentation here:https://our.umbraco.org/documentation/Reference/Routing/IISRewriteRules--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;system.webServer&gt;....&lt;!--If you wish to use IIS rewrite rules,see the documentation here:https://our.umbraco.org/documentation/Reference/Routing/IISRewriteRules--&gt;   &lt;rewrite&gt;      &lt;rules&gt;&lt;/rules&gt;    &lt;/rewrite&gt;&lt;/system.webServer&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And my Web.Release.Config to,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt; encoding&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xmlns:xdt&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;http://schemas.microsoft.com/XML-Document-Transform&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;In the example below, the &amp;quot;SetAttributes&amp;quot; transform will change the value of&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;quot;connectionString&amp;quot; to use &amp;quot;ReleaseSQLServer&amp;quot; only when the &amp;quot;Match&amp;quot; locator&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;finds an attribute &amp;quot;name&amp;quot; that has a value of &amp;quot;MyDB&amp;quot;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;connectionStrings&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;add name=&amp;quot;MyDB&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;connectionString=&amp;quot;Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;xdt:Transform=&amp;quot;SetAttributes&amp;quot; xdt:Locator=&amp;quot;Match(name)&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;/connectionStrings&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.web&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;compilation&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xdt:Transform&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;RemoveAttributes(debug)&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;In the example below, the &amp;quot;Replace&amp;quot; transform will replace the entire&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;customErrors&amp;gt; section of your web.config file.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;Note that because there is only one customErrors section under the&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;system.web&amp;gt; node, there is no need to use the &amp;quot;xdt:Locator&amp;quot; attribute.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;customErrors defaultRedirect=&amp;quot;GenericError.htm&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;mode=&amp;quot;RemoteOnly&amp;quot; xdt:Transform=&amp;quot;Replace&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;error statusCode=&amp;quot;500&amp;quot; redirect=&amp;quot;InternalError.htm&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;&amp;lt;/customErrors&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6;--2:#5C6565;--2fs:italic&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.web&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;clear&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect Non WWW&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xdt:Transform&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Insert&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.*&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{HTTP_HOST}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;^(?!www)(.*)$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;redirectType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Permanent&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://www.{C:1}/{R:0}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&gt;&lt;!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 --&gt;&lt;configuration xmlns:xdt=&amp;quot;http://schemas.microsoft.com/XML-Document-Transform&amp;quot;&gt;  &lt;!--    In the example below, the &amp;quot;SetAttributes&amp;quot; transform will change the value of    &amp;quot;connectionString&amp;quot; to use &amp;quot;ReleaseSQLServer&amp;quot; only when the &amp;quot;Match&amp;quot; locator    finds an attribute &amp;quot;name&amp;quot; that has a value of &amp;quot;MyDB&amp;quot;.    &lt;connectionStrings&gt;      &lt;add name=&amp;quot;MyDB&amp;quot;        connectionString=&amp;quot;Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True&amp;quot;        xdt:Transform=&amp;quot;SetAttributes&amp;quot; xdt:Locator=&amp;quot;Match(name)&amp;quot; /&gt;    &lt;/connectionStrings&gt;  --&gt;  &lt;system.web&gt;    &lt;compilation xdt:Transform=&amp;quot;RemoveAttributes(debug)&amp;quot; /&gt;    &lt;!--      In the example below, the &amp;quot;Replace&amp;quot; transform will replace the entire      &lt;customErrors&gt; section of your web.config file.      Note that because there is only one customErrors section under the      &lt;system.web&gt; node, there is no need to use the &amp;quot;xdt:Locator&amp;quot; attribute.      &lt;customErrors defaultRedirect=&amp;quot;GenericError.htm&amp;quot;        mode=&amp;quot;RemoteOnly&amp;quot; xdt:Transform=&amp;quot;Replace&amp;quot;&gt;        &lt;error statusCode=&amp;quot;500&amp;quot; redirect=&amp;quot;InternalError.htm&amp;quot; /&gt;      &lt;/customErrors&gt;    --&gt;  &lt;/system.web&gt;  &lt;system.webServer&gt;    &lt;rewrite&gt;      &lt;rules&gt;        &lt;clear /&gt;        &lt;rule name=&amp;quot;Redirect Non WWW&amp;quot; stopProcessing=&amp;quot;true&amp;quot; xdt:Transform=&amp;quot;Insert&amp;quot;&gt;          &lt;match url=&amp;quot;.*&amp;quot; /&gt;          &lt;conditions&gt;            &lt;add input=&amp;quot;{HTTP_HOST}&amp;quot; pattern=&amp;quot;^(?!www)(.*)$&amp;quot; /&gt;          &lt;/conditions&gt;          &lt;action type=&amp;quot;Redirect&amp;quot; redirectType=&amp;quot;Permanent&amp;quot; url=&amp;quot;https://www.{C:1}/{R:0}&amp;quot; /&gt;        &lt;/rule&gt;      &lt;/rules&gt;    &lt;/rewrite&gt;  &lt;/system.webServer&gt;&lt;/configuration&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Noticed the xdt:Transform=“Insert” in the line,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect Non WWW&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xdt:Transform&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Insert&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;rule name=&amp;quot;Redirect Non WWW&amp;quot; stopProcessing=&amp;quot;true&amp;quot; xdt:Transform=&amp;quot;Insert&amp;quot;&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Which will add the rule to the Web.config automatically during publishing.&lt;/p&gt;
&lt;p&gt;This article is part of my daily google series. And this is the very first post in this category.&lt;/p&gt;
&lt;p&gt;Cover photo by Caspar Rubin&lt;/p&gt;</content:encoded><category>debug</category><category>web-config</category><category>rewrite-rule</category><author>Abhith Rajan</author></item><item><title>Redirect non-www urls to www urls</title><link>https://www.abhith.net/blog/redirect-non-www-urls-to-www-urls/</link><guid isPermaLink="true">https://www.abhith.net/blog/redirect-non-www-urls-to-www-urls/</guid><description>When considering SEO, either you have to stick with www versioned url or non-www URLs. Having both accessible for a domain is a bad practice.</description><pubDate>Sat, 12 Aug 2017 06:32:00 GMT</pubDate><content:encoded>&lt;p&gt;When considering SEO, either you have to stick with www prefixed url or non-www urls. Having both accessible for a domain is a bad practice.&lt;/p&gt;
&lt;p&gt;After I setup my website, when I checked google for my site status, it was like below,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/blog_redirect-non-www-urls-to-www-urls_search.BdrHSyzw_20RA76.webp&quot; alt=&quot;google search&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;655&quot; height=&quot;393&quot;&gt;&lt;figcaption&gt;google search&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If you wonder why I searched like site:mydomain on google, this will list all the search results under the domain we specified.&lt;/p&gt;
&lt;p&gt;See the highlighted section. If we search again to see the omitted results. We will see search result like this,&lt;/p&gt;
&lt;figure class=&quot;content-figure&quot;&gt; &lt;img src=&quot;https://www.abhith.net/_astro/blog_redirect-non-www-urls-to-www-urls_www-error.M1t6GuUr_266EcW.webp&quot; alt=&quot;search&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;647&quot; height=&quot;408&quot;&gt;&lt;figcaption&gt;search&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;As you can see, both the url get indexed and one is omitted since it isn’t relevant.&lt;/p&gt;
&lt;p&gt;So what next,&lt;/p&gt;
&lt;p&gt;You have to choose which pattern you gonna stick to. I initially thought to go with non-www but then read the article SETTING UP UMBRACO TO ALWAYS USE WWW LINKS and decided to go with &lt;a href=&quot;http://www/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=redirect-non-www-urls-to-www-urls&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;www&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And to redirect non-www to www version, I added the rewrite rule as mentioned in the article. My Code look like this,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;https://www.abhith.net/_astro/ec.jq21y.css&quot;/&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;clear&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect Non WWW&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xdt:Transform&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Insert&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;.*&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;{HTTP_HOST}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;^(?!www)(.*)$&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;conditions&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;redirectType&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Permanent&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;https://www.{C:1}/{R:0}&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rules&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rewrite&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;system.webServer&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;system.webServer&gt;    &lt;rewrite&gt;      &lt;rules&gt;        &lt;clear /&gt;        &lt;rule name=&amp;quot;Redirect Non WWW&amp;quot; stopProcessing=&amp;quot;true&amp;quot; xdt:Transform=&amp;quot;Insert&amp;quot;&gt;          &lt;match url=&amp;quot;.*&amp;quot; /&gt;          &lt;conditions&gt;            &lt;add input=&amp;quot;{HTTP_HOST}&amp;quot; pattern=&amp;quot;^(?!www)(.*)$&amp;quot; /&gt;          &lt;/conditions&gt;          &lt;action type=&amp;quot;Redirect&amp;quot; redirectType=&amp;quot;Permanent&amp;quot; url=&amp;quot;https://www.{C:1}/{R:0}&amp;quot; /&gt;        &lt;/rule&gt;      &lt;/rules&gt;    &lt;/rewrite&gt;  &lt;/system.webServer&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Noticed the xdt:Transform=“Insert” in the line,&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;xml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D;--2:#1D689E&quot;&gt;rule&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Redirect Non WWW&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;stopProcessing&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0;--2:#5C6565&quot;&gt;xdt:Transform&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#54666C&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF;--2:#1D6F69&quot;&gt;&amp;quot;Insert&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8;--2:#5C6565&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;rule name=&amp;quot;Redirect Non WWW&amp;quot; stopProcessing=&amp;quot;true&amp;quot; xdt:Transform=&amp;quot;Insert&amp;quot;&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That is because I added this rule in my Web.Release.config, Which will add the rule to the Web.config automatically during publishing. The reason for which is explained in one of my article &lt;a href=&quot;https://www.abhith.net/blog/inserting-rewrite-rule-in-release-config&quot;&gt;INSERTING REWRITE RULE IN RELEASE CONFIG&lt;/a&gt;.&lt;/p&gt;</content:encoded><category>iis</category><category>seo</category><category>web-config</category><category>rewrite-rule</category><category>aspnet</category><author>Abhith Rajan</author></item><item><title>Hello World</title><link>https://www.abhith.net/blog/hello-world/</link><guid isPermaLink="true">https://www.abhith.net/blog/hello-world/</guid><description>Hi, this is my first blog post. Since am a dev, it should be hello world :)</description><pubDate>Fri, 11 Aug 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Hi! Welcome to my very first blog :)&lt;/p&gt;
&lt;p&gt;First of all, a little bit about myself. For the last five years or so I have been developing websites for others so recently thought of why don’t build one for myself?&lt;/p&gt;
&lt;p&gt;Now here I am.&lt;/p&gt;
&lt;p&gt;Here I wish to share my knowledge, experience and more. All the content will be my own and the images published will be either I made, like the one in this post (it is my visual studio), or will be from &lt;a href=&quot;http://unsplash.com/?ref=abhith.net&amp;amp;utm_source=abhith.net&amp;amp;utm_medium=referral&amp;amp;utm_campaign=blog&amp;amp;utm_content=hello-world&quot; rel=&quot;nofollow noopener&quot; target=&quot;_blank&quot;&gt;unsplash&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is a work in progress website so you may notice some broken parts but I will fix em as per my free time.&lt;/p&gt;</content:encoded><category>general</category><author>Abhith Rajan</author></item></channel></rss>