<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://13.90.210.135/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Coder Jony</title>
    <link>http://13.90.210.135/</link>
    <description>Welcome to CoderJony. You can find here a huge collection of technical articles &amp; bugs solutions that will surely help you in your design &amp; development phase. Apart from this, you will also find a good collection of Interview Questions that will definitely help you in your interview preparation. Most of the stuff you will find here will be related to Microsoft Technologies &amp; other open source technolgies i.e. C#, .NET, ASP.NET, MVC, TFS, VIsual Studio, JavaScript, Git, PowerShell etc.</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">1542</guid>
      <link>http://13.90.210.135/blogs/installing-using-font-awesome-icons-in-photoshop/</link>
      <title>Installing &amp; Using Font Awesome Icons in Photoshop</title>
      <description>&lt;p&gt;In this post, we will understand how can we use font-awesome icons in Photoshop. Font-awesome is a font library that contains hundreds of useful &amp;amp; latest icons in form of fonts. We can use these icons in our Photoshop design by following these easy steps. So let's just start:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Visit &lt;a href="https://fontawesome.com/download"&gt;Download&lt;/a&gt; page of Font Awesome library from this link - &lt;a href="https://fontawesome.com/download"&gt;https://fontawesome.com/download&lt;/a&gt; &amp;amp; click on &lt;strong&gt;Free for Desktop&lt;/strong&gt; button to download free fonts for your computer.
&lt;img src="http://13.90.210.135/media/1107/1-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Now, unzip the downloaded folder. You will found the folder structure like below.
&lt;img src="http://13.90.210.135/media/1108/2-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Double click on &lt;code&gt;otfs&lt;/code&gt; folder, you will found 3 font files like below.
&lt;img src="http://13.90.210.135/media/1109/3-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Now, right click on all these 3 files one by one and click install button to install these fonts on your system.
&lt;img src="http://13.90.210.135/media/1110/4-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Open Photoshop and create a new design. You must see a popup window like below. Select &lt;code&gt;height&lt;/code&gt; &amp;amp; &lt;code&gt;width&lt;/code&gt; of the design here.
&lt;img src="http://13.90.210.135/media/1111/5-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Now, select the text option from the toolbox &amp;amp; open the fonts drop-down. Here you can find the font-awesome fonts which we just installed in previous steps.
&lt;img src="http://13.90.210.135/media/1112/6-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Open this link - &lt;a href="https://fontawesome.com/icons"&gt;https://fontawesome.com/icons&lt;/a&gt;  and search the icon which you want to use. Once you find the icon, copy the icon text.
&lt;img src="http://13.90.210.135/media/1113/7-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Now, paste the copied text into Photoshop like below. 
&lt;img src="http://13.90.210.135/media/1114/8-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Select all the text and select the &lt;code&gt;font-awesome&lt;/code&gt; font from the drop-down. As soon as you select the font from the drop-down, this text will be converted into the icon.
&lt;img src="http://13.90.210.135/media/1115/9-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 10:&lt;/strong&gt; This is the final result. You can see the font-awesome font is now displaying as an icon  or image in Photoshop.
&lt;img src="http://13.90.210.135/media/1116/10-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 11:&lt;/strong&gt;  &lt;strong&gt;Important:&lt;/strong&gt; Sometimes, you may find that even after selecting the font-awesome font, text is not converting into an icon. For this issue, you may try switching the two more available options &lt;strong&gt;Regular&lt;/strong&gt; and &lt;strong&gt;Solid&lt;/strong&gt;. This should fix your issue.
&lt;img src="http://13.90.210.135/media/1106/11-installing-font-awesome-fonts-in-photoshop.png" alt="Installing Font Awesome Fonts in Photoshop" /&gt;&lt;/p&gt;
&lt;p&gt;That's all. Please share you queries, feedback in below comment box.&lt;/p&gt;
</description>
      <pubDate>Sun, 20 Oct 2019 19:08:50 Z</pubDate>
      <a10:updated>2019-10-20T19:08:50Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1541</guid>
      <link>http://13.90.210.135/blogs/integrating-log4net-with-aspnet-web-api2-and-sql-server/</link>
      <title>Integrating Log4Net with ASP.NET Web API2 and SQL Server</title>
      <description>&lt;p&gt;In this post, we will understand how can we integrate famous &lt;strong&gt;.NET Logging Library - Log4Net&lt;/strong&gt; in our ASP.NET project. Though, particularly in this post I am using an ASP.NET Web API project, but the implementation will almost remain the same even if you want to integrate Log4Net in other ASP.NET applications such as &lt;strong&gt;MVC&lt;/strong&gt;  &amp;amp; &lt;strong&gt;Web Forms&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Log4Net Integration with ASP.NET WEB API 2 and SQL Server&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;  Select  &lt;strong&gt;ASP.NET Web Application (.NET Framework)&lt;/strong&gt; project type from the list to create any ASP.NET Application (Web Forms, MVC or Web API).
&lt;img src="http://13.90.210.135/media/1090/log4net-integration-with-aspnet-web-api-2-with-sql-server-1.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Now select Web API project template as your ASP.NET Application.
&lt;img src="http://13.90.210.135/media/1091/log4net-integration-with-aspnet-web-api-2-with-sql-server-2.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Once you select the WEB API project template, Visual Studio will create a solution for you with WEB API project. You will see a similar page on your screen after creating this project.
&lt;img src="http://13.90.210.135/media/1092/log4net-integration-with-aspnet-web-api-2-with-sql-server-3.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Now, install &lt;code&gt;log4net&lt;/code&gt; Nuget package in your Web API project.
&lt;img src="http://13.90.210.135/media/1093/log4net-integration-with-aspnet-web-api-2-with-sql-server-4.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Now that you have installed &lt;code&gt;log4net&lt;/code&gt; Nuget package, you can open References node of the project &amp;amp; verify that &lt;code&gt;log4net&lt;/code&gt; DLL is present there. 
&lt;img src="http://13.90.210.135/media/1094/log4net-integration-with-aspnet-web-api-2-with-sql-server-5.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; So far we have done the stuff to create the Web API project &amp;amp; install
the Nuget package of &lt;code&gt;log4net&lt;/code&gt;. Now, in next few steps - we will work with
SQL Server to create the database where we will be logging the
information, errors, warnings etc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Open &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt; &amp;amp; connect with the server using valid credentials.
&lt;img src="http://13.90.210.135/media/1095/log4net-integration-with-aspnet-web-api-2-with-sql-server-6.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Once you are inside SQL Server, create a new database like below.
&lt;img src="http://13.90.210.135/media/1096/log4net-integration-with-aspnet-web-api-2-with-sql-server-7.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Just type the name of the database in the text-box like below.
&lt;img src="http://13.90.210.135/media/1097/log4net-integration-with-aspnet-web-api-2-with-sql-server-8.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Now, execute below script on this newly created database. This script will create the table where &lt;code&gt;log4net&lt;/code&gt; will log the records.&lt;/p&gt;
&lt;pre class="lang-sql"&gt;&lt;code&gt;CREATE TABLE [dbo].[Log] (
	[Id] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[Date] [datetime] NOT NULL,
	[Thread] [varchar](255) NOT NULL,
	[Level] [varchar](50) NOT NULL,
	[Logger] [varchar](255) NOT NULL,
	[Message] [varchar](4000) NOT NULL,
	[Exception] [varchar](2000) NULL
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src="http://13.90.210.135/media/1098/log4net-integration-with-aspnet-web-api-2-with-sql-server-9.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 10:&lt;/strong&gt; Once you execute above script, &lt;code&gt;Log&lt;/code&gt; table will look like below in SQL Server.
&lt;img src="http://13.90.210.135/media/1099/log4net-integration-with-aspnet-web-api-2-with-sql-server-10.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 11:&lt;/strong&gt; Now you need to add some configurations in your &lt;code&gt;web.config&lt;/code&gt; file that &lt;code&gt;Log4Net&lt;/code&gt; uses to log records.
We will add these configurations in two steps. &lt;/p&gt;
&lt;p&gt;First, add &lt;code&gt;log4net&lt;/code&gt; section inside &lt;code&gt;configSections&lt;/code&gt; like below.&lt;/p&gt;
&lt;pre  class="lang-xml"&gt;&lt;code&gt;&amp;lt;configSections&gt;
    &amp;lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
&amp;lt;/configSections&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Secondly, add below &lt;code&gt;log4net&lt;/code&gt; section in root &lt;code&gt;configuration&lt;/code&gt; node. &lt;em&gt;(&lt;/em&gt;&lt;em&gt;Note&lt;/em&gt;&lt;em&gt;: Update connection string according to your environment).&lt;/em&gt;&lt;/p&gt;
&lt;pre class="lang-xml"&gt;&lt;code&gt;&amp;lt;log4net&gt;
	&amp;lt;appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"&gt;
	  &amp;lt;bufferSize value="1" /&gt;
	  &amp;lt;connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
	  &amp;lt;connectionString value="data source=localhost;initial catalog=Log4Net_Demo;persist security info=True;user id=sa;password=yourPassword;" /&gt;
	  &amp;lt;commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" /&gt;
	  &amp;lt;parameter&gt;
		&amp;lt;parameterName value="@log_date" /&gt;
		&amp;lt;dbType value="DateTime" /&gt;
		&amp;lt;layout type="log4net.Layout.RawTimeStampLayout" /&gt;
	  &amp;lt;/parameter&gt;
	  &amp;lt;parameter&gt;
		&amp;lt;parameterName value="@thread" /&gt;
		&amp;lt;dbType value="String" /&gt;
		&amp;lt;size value="255" /&gt;
		&amp;lt;layout type="log4net.Layout.PatternLayout"&gt;
		  &amp;lt;conversionPattern value="%thread" /&gt;
		&amp;lt;/layout&gt;
	  &amp;lt;/parameter&gt;
	  &amp;lt;parameter&gt;
		&amp;lt;parameterName value="@log_level" /&gt;
		&amp;lt;dbType value="String" /&gt;
		&amp;lt;size value="50" /&gt;
		&amp;lt;layout type="log4net.Layout.PatternLayout"&gt;
		  &amp;lt;conversionPattern value="%level" /&gt;
		&amp;lt;/layout&gt;
	  &amp;lt;/parameter&gt;
	  &amp;lt;parameter&gt;
		&amp;lt;parameterName value="@logger" /&gt;
		&amp;lt;dbType value="String" /&gt;
		&amp;lt;size value="255" /&gt;
		&amp;lt;layout type="log4net.Layout.PatternLayout"&gt;
		  &amp;lt;conversionPattern value="%logger" /&gt;
		&amp;lt;/layout&gt;
	  &amp;lt;/parameter&gt;
	  &amp;lt;parameter&gt;
		&amp;lt;parameterName value="@message" /&gt;
		&amp;lt;dbType value="String" /&gt;
		&amp;lt;size value="4000" /&gt;
		&amp;lt;layout type="log4net.Layout.PatternLayout"&gt;
		  &amp;lt;conversionPattern value="%message" /&gt;
		&amp;lt;/layout&gt;
	  &amp;lt;/parameter&gt;
	  &amp;lt;parameter&gt;
		&amp;lt;parameterName value="@exception" /&gt;
		&amp;lt;dbType value="String" /&gt;
		&amp;lt;size value="2000" /&gt;
		&amp;lt;layout type="log4net.Layout.ExceptionLayout" /&gt;
	  &amp;lt;/parameter&gt;
	&amp;lt;/appender&gt;
	&amp;lt;root&gt;
	  &amp;lt;appender-ref ref="AdoNetAppender"/&gt;
	&amp;lt;/root&gt;
&amp;lt;/log4net&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: In current post, we are using &lt;code&gt;AdoNetAppender&lt;/code&gt; appender
that is used to log data in SQL Server. If we want to change the
target, we can use different type of log4net appender. For example, we
have different types of Appenders in Log4Net.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AdoNetAppender&lt;/li&gt;
&lt;li&gt;FileAppender&lt;/li&gt;
&lt;li&gt;SmtpAppender&lt;/li&gt;
&lt;li&gt;&lt;a href="https://logging.apache.org/log4net/log4net-1.2.13/release/sdk/log4net.Appender.html"&gt;Complete List of Appenders&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Below picture will give you more clarity on where you need to place above configurations in &lt;code&gt;web.config&lt;/code&gt; file.
&lt;img src="http://13.90.210.135/media/1100/log4net-integration-with-aspnet-web-api-2-with-sql-server-11.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 12:&lt;/strong&gt; Now, back in Web API project. Open &lt;code&gt;Global.asax&lt;/code&gt; file and add &lt;code&gt;XmlConfigurator.Configure();&lt;/code&gt;at the end of &lt;code&gt;Application_Start&lt;/code&gt; event handler. &lt;code&gt;Log4Net&lt;/code&gt; uses this method to read the configurations from config file and do it's initialization stuff.
&lt;img src="http://13.90.210.135/media/1101/log4net-integration-with-aspnet-web-api-2-with-sql-server-12.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 13:&lt;/strong&gt; Now, modify the code of &lt;code&gt;ValuesController&lt;/code&gt; like below, just to test the &lt;code&gt;Log4Net&lt;/code&gt; integration. You can also copy &amp;amp; paste the code from here.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;&lt;code&gt;public class ValuesController : ApiController
{
    private readonly ILog log = LogManager.GetLogger("API Logger");

    public IEnumerable&lt;string&gt; Get()
    {
        log.Info("Log Info Message");
        log.Debug("Log Debug Message");
        log.Error("Log Error Message");
        log.Warn("Log Warning Message");

        return new string[] { "value1", "value2" };
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src="http://13.90.210.135/media/1102/log4net-integration-with-aspnet-web-api-2-with-sql-server-13.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 14:&lt;/strong&gt; Press the &lt;code&gt;F5&lt;/code&gt; button to run the application and hit the Values controller like below. &lt;em&gt;(&lt;strong&gt;Note&lt;/strong&gt;:  Application port may vary from below picture)&lt;/em&gt;
&lt;img src="http://13.90.210.135/media/1103/log4net-integration-with-aspnet-web-api-2-with-sql-server-14.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 15:&lt;/strong&gt; You will see that application hits the break-point when you access the Values controller from browser. And it will also logs the records in your connected database.
&lt;img src="http://13.90.210.135/media/1104/log4net-integration-with-aspnet-web-api-2-with-sql-server-15.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 16:&lt;/strong&gt; Just verify the data in &lt;code&gt;Logs&lt;/code&gt; table by executing the script &lt;code&gt;Select * FROM [dbo].[Logs]&lt;/code&gt;. You will find that all log data have been logged successfully into your SQL Server database.
&lt;img src="http://13.90.210.135/media/1105/log4net-integration-with-aspnet-web-api-2-with-sql-server-16.png" alt="Integrating Log4Net with ASP.NET Web API2 and SQL Server" /&gt;&lt;/p&gt;
&lt;p&gt;That's all. Please share your comments, suggestions or feedback in below comment box.&lt;/p&gt;
</description>
      <pubDate>Thu, 17 Oct 2019 18:36:40 Z</pubDate>
      <a10:updated>2019-10-17T18:36:40Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1523</guid>
      <link>http://13.90.210.135/blogs/creating-a-pipe-to-filter-the-items-in-the-list-using-angular-7/</link>
      <title>Creating a Pipe to filter the items in the list using Angular 7</title>
      <description>&lt;p&gt;Having a search box &amp;amp; filtering out the list on the basis of the text of that search box is a common development task in almost every software application.&lt;/p&gt;
&lt;p&gt;In this post, we will understand how can we achieve the same functionality in Angular 7 using Pipe.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is Pipe?&lt;/strong&gt;&lt;br/&gt; Pipes are a useful feature in Angular. They are a way to transform one value to another inside Angular template. There
are some built-in pipes, but we can also create our own custom pipes. You
can more read about pipes on Angular's website - &lt;a href="https://angular.io/guide/pipes"&gt;https://angular.io/guide/pipes&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Creating a Pipe to filter the items in the list using Angular 7&lt;/h1&gt;
&lt;p&gt;In this post, I am using a list of a complex object for filtering purpose, instead of having a simple list of string. In our case, the component will somehow look like below.&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-javascript"&gt;// search text property
searchText: string;

// list of categories
categories: any[] = [
{id: 1, categoryName:"Schools"},
{id: 2, categoryName:"Colleges"},
{id: 3, categoryName:"Doctors"},
{id: 4, categoryName:"Hospitals"},
{id: 5, categoryName:"Advocates"}
]&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now we want to filter this list on the basis of the category name. 
To do this, we did two things.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First, we created a textbox &amp;amp; bound it with &lt;code&gt;searchText&lt;/code&gt; which is a
   string property of the component.&lt;/li&gt;
&lt;li&gt;Secondly, we created another property of type array that holds the
   above categories. We call that property as &lt;code&gt;categories&lt;/code&gt;. Now, our
   template markup will look like this.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="lang-javascript"&gt;&amp;lt;!-- Search box --&gt;
&amp;lt;input type="text" [(ngModel)]="searchText" placeholder="Search Category" /&gt;

&amp;lt;!-- List of categories --&gt;
&amp;lt;ul&gt;
  &amp;lt;li *ngFor="let item of categories | filter : searchText : 'categoryName'"&gt;
	{{item.categoryName}}
  &amp;lt;/li&gt;
&amp;lt;/li&gt;&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;filter.pipe.ts (Definition for Filter pipe)&lt;/h2&gt;
&lt;pre&gt;&lt;code class="lang-typescript"&gt;import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'filter'
})
export class FilterPipe implements PipeTransform {

  transform(items: any[], searchText: string, fieldName: string): any[] {

    // return empty array if array is falsy
    if (!items) { return []; }

    // return the original array if search text is empty
    if (!searchText) { return items; }

    // convert the searchText to lower case
    searchText = searchText.toLowerCase();

    // retrun the filtered array
    return items.filter(item =&gt; {
      if (item &amp;&amp; item[fieldName]) {
        return item[fieldName].toLowerCase().includes(searchText);
      }
      return false;
    });
   }
}&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also, don't forget to register this filter pipe in &lt;code&gt;app.module.ts&lt;/code&gt; file inside &lt;code&gt;declarations&lt;/code&gt; array.&lt;/p&gt;
</description>
      <pubDate>Sat, 27 Jul 2019 15:11:20 Z</pubDate>
      <a10:updated>2019-07-27T15:11:20Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1522</guid>
      <link>http://13.90.210.135/blogs/solution-could-not-load-file-or-assembly-systemnethttp-version-4200-culture-neutral-publickeytoken-b03f5f7f11d50a3a-or-one-of-its-dependencies-the-system-cannot-find-the-file-specified/</link>
      <title>Solution: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</title>
      <description>&lt;p&gt;In this post, I have tried to explain both the root cause &amp;amp; solution for the above error.&lt;/p&gt;
&lt;h2&gt;Root Cause:&lt;/h2&gt;
&lt;p&gt;You normally get this issue when you take the reference of certain third party library in your application.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;For example, you took the reference of &lt;strong&gt;RestSharp&lt;/strong&gt; (A third-party library) from NuGet. That RestSharp internally may have used the reference of &lt;code&gt;System.Net.Http&lt;/code&gt; &lt;code&gt;4.2.0.0&lt;/code&gt; version. And your project is also using the reference to &lt;code&gt;System.Net.Http&lt;/code&gt; &lt;code&gt;4.0.0.0&lt;/code&gt; (From GAC). Now when you run the application &amp;amp; try to call any method which is using &lt;strong&gt;RestSharp&lt;/strong&gt;, at the same time Runtime (CLR) tries to locate the &lt;code&gt;System.Net.Http&lt;/code&gt; assembly with version &lt;code&gt;4.2.0.0&lt;/code&gt; &amp;amp; when it fails to locate the desired version, it throws &lt;code&gt;System.IO.FileNotFoundException&lt;/code&gt; exception with below error message.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of &amp;gt; its dependencies. The system cannot find the file specified.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here you can see &lt;a href="https://docs.microsoft.com/en-us/dotnet/framework/deployment/how-the-runtime-locates-assemblies"&gt;How the Runtime Locates Assemblies&lt;/a&gt;?&lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;Just add below configuration in the &lt;code&gt;web.config&lt;/code&gt; or &lt;code&gt;app.config&lt;/code&gt; of your startup project.&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-xml"&gt;&amp;lt;dependentAssembly&gt;
	&amp;lt;assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /&gt;
	&amp;lt;bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.0.0.0" /&gt;
&amp;lt;/dependentAssembly&gt;&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;
This configuration instructs the runtime to resolve &lt;code&gt;System.Net.Http&lt;/code&gt; assembly with &lt;code&gt;4.0.0.0&lt;/code&gt; version only, whenever it looks for this assembly for any version between &lt;code&gt;0.0.0.0&lt;/code&gt; to &lt;code&gt;4.2.0.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is the complete schema:&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-xml"&gt;&amp;lt;configuration&gt;  
   &amp;lt;runtime&gt;  
	  &amp;lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;  
		&amp;lt;dependentAssembly&gt;
			&amp;lt;assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /&gt;
			&amp;lt;bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.0.0.0" /&gt;
		&amp;lt;/dependentAssembly&gt;
	  &amp;lt;/assemblyBinding&gt;  
   &amp;lt;/runtime&gt;  
&amp;lt;/configuration&gt;&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Hopefully, this should fix the issue. If not, just let me know your comments in below comment box.&lt;/p&gt;
</description>
      <pubDate>Sat, 27 Jul 2019 14:44:12 Z</pubDate>
      <a10:updated>2019-07-27T14:44:12Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1521</guid>
      <link>http://13.90.210.135/blogs/useful-ionic-cli-commands-for-android-application-development-using-ionic-4-and-cordova/</link>
      <title>Useful Ionic-CLI Commands for Android Application Development using Ionic 4 and Cordova</title>
      <description>&lt;p&gt;As I was developing an Android application using &lt;code&gt;Ionic 4&lt;/code&gt;, I found a few commands quite useful during the development. I thought to make a note of those useful commands here.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ionic start [&amp;lt;name&amp;gt;] [&amp;lt;template&amp;gt;]&lt;/code&gt; - Create a new project.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic serve&lt;/code&gt; - Open up the Ionic application in the browser.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic cordova run android&lt;/code&gt; - Run the Ionic application in either emulator or connected Android device.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic cordova emulate android&lt;/code&gt; - Emulate an Ionic project on a simulator or emulator.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ioinc cordova build android&lt;/code&gt; - Build the ionic application &amp;amp; generates a debug &lt;code&gt;.apk&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic cordova build android --prod --release&lt;/code&gt; - Build the ionic application &amp;amp; generates a release &lt;code&gt;.apk&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic cordova platform add android&lt;/code&gt; - Add Android as a platform in an Ionic application.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic cordova prepare&lt;/code&gt; - Install platforms and plugins listed in config.xml of Ionic Cordova application.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ionic g&lt;/code&gt; - Generate pipes, components, pages, directives, providers, and tabs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also find a complete list of Ionic CLI commands on its official website. Here is the link - &lt;a href="https://ionicframework.com/docs/v3/cli/commands.html"&gt;https://ionicframework.com/docs/v3/cli/commands.html&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Thu, 04 Jul 2019 12:18:44 Z</pubDate>
      <a10:updated>2019-07-04T12:18:44Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1520</guid>
      <link>http://13.90.210.135/blogs/capitalize-the-first-letter-of-input-textbox-using-directive-in-angular-6/</link>
      <title>Capitalize the first letter of input textbox using Directive in Angular 6</title>
      <description>&lt;p&gt;To capitalize the first letter of the input textbox, we can create a custom directive in the Angular application. &lt;/p&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;strong&gt;Attribute Directive vs Structural Directive&lt;/strong&gt; :&lt;/h4&gt;
&lt;p&gt;The directive which we are going to create is an &lt;strong&gt;Attribute Directive&lt;/strong&gt; because we are
manipulating only the behavior of the DOM element. There is one more
type of directive which manipulates the DOM (add or remove DOM
elements) known as &lt;strong&gt;Structural Directive&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this example, I have created a custom directive &lt;code&gt;TitleCaseDirective&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;TitleCaseDirective.ts (Attribute Directive)&lt;/h2&gt;
&lt;pre class="lang-typescript"&gt;&lt;code&gt;import { Directive, ElementRef, HostListener  } from '@angular/core';

@Directive({
  selector: '[appTitleCase]'
})
export class TitleCaseDirective {

  constructor(private el: ElementRef) {
  }

  @HostListener('blur') onBlur() {
    if (this.el.nativeElement.value) {
      const arr: string[] = this.el.nativeElement.value.split('');
      arr[0] = arr[0].toUpperCase();
      this.el.nativeElement.value = arr.join('');
   }
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Use of Directive in Component Template&lt;/h2&gt;
&lt;pre class="lang-html"&gt;&lt;code&gt;&amp;lt;input appTitleCase type="text" class="form-control" /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This custom directive will now turn the first letter to uppercase once the user loses focus from the input.&lt;/p&gt;
</description>
      <pubDate>Thu, 27 Jun 2019 19:48:09 Z</pubDate>
      <a10:updated>2019-06-27T19:48:09Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1519</guid>
      <link>http://13.90.210.135/blogs/top-50-angular-interview-questions/</link>
      <title>Top 50 Angular Interview Questions</title>
      <description>&lt;p&gt;Please find below the top 50 most asked Angular interview questions. These questions must help you in boosting your self-confidence before you appear in the interview. These questions are applicable for all versions of Angular from Angular 2 to Angular 7.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What is Angular?&lt;/li&gt;
&lt;li&gt;How Angular is different from AngularJS?&lt;/li&gt;
&lt;li&gt;What is TypeScript?&lt;/li&gt;
&lt;li&gt;Explain lifecycle hooks of Angular?&lt;/li&gt;
&lt;li&gt;What are few building blocks of Angular?&lt;/li&gt;
&lt;li&gt;What is Component in Angular?&lt;/li&gt;
&lt;li&gt;What is Directive?&lt;/li&gt;
&lt;li&gt;What are different types of Directives?&lt;/li&gt;
&lt;li&gt;What is Service?&lt;/li&gt;
&lt;li&gt;What are Providers in Angular?&lt;/li&gt;
&lt;li&gt;In how many ways we can register providers in Angular?&lt;/li&gt;
&lt;li&gt;How does DI works in Angular?&lt;/li&gt;
&lt;li&gt;What is @Injectable decorator?&lt;/li&gt;
&lt;li&gt;What are Configuration Decorators? &lt;/li&gt;
&lt;li&gt;Name few decorators?&lt;/li&gt;
&lt;li&gt;What is Module in Angular?&lt;/li&gt;
&lt;li&gt;What is feature module in Angular?&lt;/li&gt;
&lt;li&gt;Use of Imports, Declarations, Providers in Angular Module?&lt;/li&gt;
&lt;li&gt;Use of forRoot()?&lt;/li&gt;
&lt;li&gt;How will you make the service singleton for lazy loaded modules?&lt;/li&gt;
&lt;li&gt;How does DI works in case of lazy loaded modules?&lt;/li&gt;
&lt;li&gt;Difference between Component &amp;amp; Directive?&lt;/li&gt;
&lt;li&gt;How does Angular App bootstraps itself? &lt;/li&gt;
&lt;li&gt;What is Main.ts file?&lt;/li&gt;
&lt;li&gt;How to bootstrap Angular App with a module other than App Module?&lt;/li&gt;
&lt;li&gt;What does bootstrap module does?&lt;/li&gt;
&lt;li&gt;What is BrowserModule in Angular?&lt;/li&gt;
&lt;li&gt;How index.html understands component selectors?&lt;/li&gt;
&lt;li&gt;How to share component between lazy loaded modules? &lt;/li&gt;
&lt;li&gt;How to pass OAuth token in Angular? &lt;/li&gt;
&lt;li&gt;How to prevent few requests to not go through the interceptor? &lt;/li&gt;
&lt;li&gt;How to centralized exception handling? &lt;/li&gt;
&lt;li&gt;How @ViewChild can improve performance?&lt;/li&gt;
&lt;li&gt;BehaviourSubject vs Observable?&lt;/li&gt;
&lt;li&gt;What is ErrorHandler class in Angular?&lt;/li&gt;
&lt;li&gt;JIT vs AOT?&lt;/li&gt;
&lt;li&gt;Angular vs React?&lt;/li&gt;
&lt;li&gt;What is Observable?&lt;/li&gt;
&lt;li&gt;Promise &amp;amp; Observable?&lt;/li&gt;
&lt;li&gt;What is RxJS?&lt;/li&gt;
&lt;li&gt;Name few RxJS operators?&lt;/li&gt;
&lt;li&gt;Explain these RxJS Operators - map(), catch(), filter(), flatMap() etc.&lt;/li&gt;
&lt;li&gt;What are Pipes?&lt;/li&gt;
&lt;li&gt;What is template variable in Angular?&lt;/li&gt;
&lt;li&gt;What are pipes?&lt;/li&gt;
&lt;li&gt;What are some inbuilt pipes &amp;amp; how do pass arguments in them?&lt;/li&gt;
&lt;li&gt;How to create a custom pipe?&lt;/li&gt;
&lt;li&gt;What are input &amp;amp; output properties?&lt;/li&gt;
&lt;li&gt;What is Change Detection?&lt;/li&gt;
&lt;li&gt;How can we improve performance of an Angular application?&lt;/li&gt;
&lt;/ol&gt;
</description>
      <pubDate>Wed, 19 Jun 2019 13:06:21 Z</pubDate>
      <a10:updated>2019-06-19T13:06:21Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1513</guid>
      <link>http://13.90.210.135/blogs/how-to-use-behavioursubject-to-share-the-data-to-other-components-in-angular/</link>
      <title>How to use BehaviourSubject to share the data to other components in Angular</title>
      <description>&lt;p&gt;We use &lt;code&gt;BehaviourSubject&lt;/code&gt; to share the data with multiple components using a shared service. &lt;/p&gt;
&lt;p&gt;For example, if we want to notify other components of the data change. Then we have to do two simple tasks.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
We have to create a &lt;code&gt;BehaviourSubject&lt;/code&gt; &amp;amp; an &lt;code&gt;Observable&lt;/code&gt; of that
&lt;code&gt;BehaviourSubject&lt;/code&gt; in a service.
&lt;/li&gt;
&lt;li&gt;Secondly, we can subscribe to that &lt;code&gt;Observable&lt;/code&gt; in other components.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have created below service to notify another component to log out the user from the application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. data.service.ts&lt;/strong&gt; - Read the comments marked with 1, 2, 3 &amp;amp; 4 steps. They explains their usage itself.&lt;/p&gt;
&lt;pre class="lang-typescript"&gt;&lt;code&gt;import { Injectable } from '@angular/core';

//1. Import BehaviorSubject from rxjs module
import { BehaviorSubject } from 'rxjs/BehaviorSubject'

@Injectable({
  providedIn: 'root'
})
export class DataService {

  //2. Create the data which we want to share with all the components
  private logoutStatus = new BehaviorSubject&lt;boolean&gt;(false);

  //3. Now we want to broadcast this message or data, so we create an observable
  getLogoutStatus = this.logoutStatus.asObservable();

  constructor() { }

  //4. Create a method that updates the data (Behaviour Subject)
  logoutUser(){
    this.logoutStatus.next(true);
  }
}
&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. logout.ts -&lt;/strong&gt; In this, the &lt;code&gt;logoutUser()&lt;/code&gt; method of &lt;code&gt;DataService&lt;/code&gt; that will update the value of &lt;code&gt;BehaviourSubject&lt;/code&gt; so that all &amp;amp; the observable (i.e. &lt;code&gt;getLogoutStatus&lt;/code&gt; )of this &lt;code&gt;BehaviourSubject&lt;/code&gt; will broadcast the message to all subscribers.&lt;/p&gt;
&lt;pre class="lang-typescript"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { DataService } from './../../services/data.service'

@Component({
  selector: 'app-logout',
  templateUrl: './logout.component.html',
  styleUrls: ['./logout.component.scss']
})
export class LogoutComponent implements OnInit {

  constructor(private dataService : DataService) { }

  ngOnInit() {
    console.log("ngOnInit called");
  }

  onLogout(){
    this.dataService.logoutUser();
  }
}
&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. app.component.ts&lt;/strong&gt; - In this component, we have subscribed the&lt;code&gt;getLogoutStatus&lt;/code&gt; observable. The subscription handle will be executed every time whenever there is a change in the value of &lt;code&gt;BehaviourSubject&lt;/code&gt;.&lt;/p&gt;
&lt;pre class="lang-typescript"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { DataService } from './services/data.service';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  title = 'MyApp';

  constructor(private dataService : DataService) { }

  ngOnInit() {
    this.dataService.getLogoutStatus.subscribe((data) =&gt; {
      if(data === true){
        alert("User has been loggedout");
      }
    })
  }
}
&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
</description>
      <pubDate>Sat, 27 Apr 2019 13:56:24 Z</pubDate>
      <a10:updated>2019-04-27T13:56:24Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1512</guid>
      <link>http://13.90.210.135/blogs/solution-cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-input/</link>
      <title>Solution: Can't bind to 'ngModel' since it isn't a known property of 'input'.</title>
      <description>&lt;p&gt;Just add &lt;code&gt;FormsModule&lt;/code&gt; in &lt;code&gt;app.module.ts&lt;/code&gt; file your Angular application.&lt;/p&gt;
&lt;p&gt;&lt;script src="https://gist.github.com/ankushjain358/faba08fc899e418f62a3ac2f428bf8ca.js"&gt;&lt;/script&gt;&lt;/p&gt;
</description>
      <pubDate>Thu, 25 Apr 2019 17:39:23 Z</pubDate>
      <a10:updated>2019-04-25T17:39:23Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1511</guid>
      <link>http://13.90.210.135/blogs/how-to-add-bootstrap-in-an-angular-application/</link>
      <title>How to add bootstrap in an Angular application?</title>
      <description>&lt;p&gt;Adding the bootstrap library in an Angular application is quite easy. Bootstrap Library consists of both CSS &amp;amp; JS files. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bootstrap CSS&lt;/strong&gt; files are used for design/UI purpose.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bootstrap JavaScript&lt;/strong&gt; files are used in some of its components such as Accordion, Tooltip, Modal Popup, Tabs, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, let's understand - How can we add bootstrap library in the Angular application.&lt;/p&gt;
&lt;h2&gt;Step 1: Install Bootstrap&lt;/h2&gt;
&lt;p&gt;First, open angular CLI &amp;amp; hit below command. &lt;pre class="lang-bash"&gt;&lt;code&gt;npm install bootstrap --save&lt;/pre&gt;&lt;/code&gt;
This will install bootstrap node module in your application inside &lt;code&gt;node_modules&lt;/code&gt; folder.&lt;/p&gt;
&lt;h2&gt;Step 2: Adding Bootstrap Styles&lt;/h2&gt;
&lt;p&gt;There are two ways to add bootstrap CSS in the application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Method 1:&lt;/strong&gt;  Open &lt;code&gt;angular.json&lt;/code&gt; file &amp;amp; add bootstrap CSS file reference in styles array.&lt;/p&gt;
&lt;pre class="language-json"&gt;&lt;code&gt;"styles": [
              "./node_modules/bootstrap/dist/css/bootstrap.min.css"
            ]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br/&gt;
&lt;strong&gt;Method 2:&lt;/strong&gt; Open &lt;code&gt;styles.css&lt;/code&gt; file which is present in the &lt;code&gt;src&lt;/code&gt; folder &amp;amp; add an &lt;code&gt;import&lt;/code&gt; statement like below.&lt;/p&gt;
&lt;pre class="language-css"&gt;&lt;code&gt;@import "~bootstrap/dist/css/bootstrap.min.css";&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 3: Adding Bootstrap JavaScript&lt;/h2&gt;
&lt;p&gt;Bootstrap JavaScript components depend upon two other JavaScript libraries - &lt;code&gt;jQuery&lt;/code&gt; &amp;amp; &lt;code&gt;popper.js&lt;/code&gt;. So first, we have to install these two dependencies from &lt;code&gt;npm&lt;/code&gt;.&lt;/p&gt;
&lt;pre class="language-bash"&gt;&lt;code&gt;npm install jquery --save
npm install popper.js --save
&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After this, open &lt;code&gt;angular.json&lt;/code&gt; file &amp;amp; update scripts section like below:&lt;/p&gt;
&lt;pre class="language-json"&gt;&lt;code&gt;"scripts": [
              "./node_modules/jquery/dist/jquery.min.js",
              "./node_modules/popper.js/dist/umd/popper.min.js",
              "./node_modules/bootstrap/dist/js/bootstrap.min.js"
            ]&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Step 4: Accessing Bootstrap JavaScript Library in Angular&lt;/h2&gt;
&lt;p&gt;So far, we have added the bootstrap JavaScript library to the application. But we might need to call some methods of this library such as &lt;code&gt;modal('show')&lt;/code&gt; to show the modal popup, &lt;code&gt;tab('show')&lt;/code&gt; to activate a tab. &lt;/p&gt;
&lt;p&gt;In order to access these methods of bootstrap library &amp;amp; get proper intellisense support in Visual Studio Code IDE, we should install &lt;code&gt;types&lt;/code&gt; for &lt;code&gt;jQuery&lt;/code&gt; &amp;amp; &lt;code&gt;Bootstrap&lt;/code&gt; libraries.&lt;/p&gt;
&lt;pre class="language-bash"&gt;&lt;code&gt;npm install @types/jquery --save
npm install @types/bootstrap --save&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;tsconfig.json&lt;/strong&gt; - Look into this file for &lt;strong&gt;types&lt;/strong&gt; array and add &lt;strong&gt;jquery&lt;/strong&gt; and &lt;strong&gt;bootstrap&lt;/strong&gt; entries.&lt;/p&gt;
&lt;pre class="language-json"&gt;&lt;code&gt;"types": [
      "jquery",
      "bootstrap",  
      "node"
]&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That's all :)&lt;/p&gt;
</description>
      <pubDate>Sat, 20 Apr 2019 19:21:51 Z</pubDate>
      <a10:updated>2019-04-20T19:21:51Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1510</guid>
      <link>http://13.90.210.135/blogs/passing-by-value-passing-by-reference-in-c-using-reference-types/</link>
      <title>Passing by value &amp; passing by reference in C# using Reference Types</title>
      <description>&lt;h2&gt;Case 1: &lt;/h2&gt;
&lt;p&gt;Both are same.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;&lt;code&gt;public class Program
{
        static void Main()
        {
            Employee employee;

            employee = new Employee();
            PopulateEmployee(employee);
            Console.WriteLine($"Sr.No: {employee.SrNo} &amp; Name: {employee.Name}");

            employee = new Employee();
            PopulateEmployeeByRef(ref employee);
            Console.WriteLine($"Sr.No: {employee.SrNo} &amp; Name: {employee.Name}");

            Console.ReadLine();
        }

        public static void PopulateEmployee(Employee employee)
        {
            //employee = new Employee();
            employee.SrNo = 1;
            employee.Name = "Ankush Jain";
        }

        public static void PopulateEmployeeByRef(ref Employee employee)
        {
            //employee = new Employee();
            employee.SrNo = 1;
            employee.Name = "Ankush Jain";
        }
}

public class Employee
{
        public int SrNo { get; set; }
        public string Name { get; set; }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Case 2:&lt;/h2&gt;
&lt;p&gt;Instantiation of the parameter in passing by reference actually changes the value of properties of passed argument while passing by value does not.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;&lt;code&gt;public class Program
{
        static void Main()
        {
            Employee employee;

            employee = new Employee();
            PopulateEmployee(employee);
            Console.WriteLine($"Sr.No: {employee.SrNo} &amp; Name: {employee.Name}");

            employee = new Employee();
            PopulateEmployeeByRef(ref employee);
            Console.WriteLine($"Sr.No: {employee.SrNo} &amp; Name: {employee.Name}");

            Console.ReadLine();
        }

        public static void PopulateEmployee(Employee employee)
        {
            employee = new Employee();
            employee.SrNo = 1;
            employee.Name = "Ankush Jain";
        }

        public static void PopulateEmployeeByRef(ref Employee employee)
        {
            employee = new Employee();
            employee.SrNo = 1;
            employee.Name = "Ankush Jain";
        }
}

public class Employee
{
        public int SrNo { get; set; }
        public string Name { get; set; }
}&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt; &lt;a href="https://stackoverflow.com/a/1293120/1273882"&gt;https://stackoverflow.com/a/1293120/1273882&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Tue, 16 Apr 2019 17:34:58 Z</pubDate>
      <a10:updated>2019-04-16T17:34:58Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1484</guid>
      <link>http://13.90.210.135/blogs/how-to-fix-could-not-find-a-base-address-that-matches-scheme-https-for-the-endpoint-with-binding-basichttpbinding-registered-base-address-schemes-are/</link>
      <title>How to fix - "Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are..."</title>
      <description>&lt;p&gt;Just follow below two steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Add missing HTTPS binding in IIS. &lt;strong&gt;Go to IIS &amp;gt; Website &amp;gt; Bindings &amp;gt;
Add Binding&lt;/strong&gt;. &lt;br/&gt;See below screenshot. &lt;img src="http://13.90.210.135/media/1088/could-not-find-a-base-address-that-matches-scheme-https.png" alt="enter image description
here" /&gt;
&lt;/li&gt;
&lt;li&gt;
Now, Add &lt;code&gt;serviceBehaviours&lt;/code&gt; in &lt;code&gt;web.config&lt;/code&gt; file like below:
&lt;pre&gt;&lt;code class="lang-markup"&gt;&amp;lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
</description>
      <pubDate>Tue, 26 Mar 2019 08:56:00 Z</pubDate>
      <a10:updated>2019-03-26T08:56:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1483</guid>
      <link>http://13.90.210.135/blogs/wcf-service-error-this-collection-already-contains-an-address-with-scheme-http/</link>
      <title>WCF Service Error - "This collection already contains an address with scheme http"</title>
      <description>&lt;p&gt;Just add below section in your &lt;code&gt;web.config&lt;/code&gt; file.&lt;/p&gt;
&lt;pre&gt;
&lt;code class="lang-markup"&gt;&amp;lt;system.serviceModel&gt;
     &amp;LT;serviceHostingEnvironment multipleSiteBindingsEnabled="true"/&gt;
&amp;lt;/system.serviceModel&gt;&lt;/code&gt;
&lt;/pre&gt;</description>
      <pubDate>Tue, 26 Mar 2019 08:48:42 Z</pubDate>
      <a10:updated>2019-03-26T08:48:42Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1482</guid>
      <link>http://13.90.210.135/blogs/database-unit-testing-for-sql-server-using-tsqlt/</link>
      <title>Database Unit Testing for SQL Server using tSQLt</title>
      <description>&lt;p&gt;In this blog, I am sharing the key points which I noted while learning the basics of database unit testing for SQL Server.&lt;/p&gt;
&lt;h2&gt;Installation:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tSQLt&lt;/code&gt; must be installed on the SQL Server database.&lt;/li&gt;
&lt;li&gt;Download the .zip file from its website.&lt;/li&gt;
&lt;li&gt;
Unzip that file, there will be mainly 3 SQL files.
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SetClrEnabled.sql&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tSQLt.class.sql&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Example.sql&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;First Enable CLR from the first file.&lt;/li&gt;
&lt;li&gt;Second, set the database trustworthy from the script given in given
   link. Link - &lt;a href="https://tsqlt.org/user-guide/quick-start/#InstallToDevDb"&gt;https://tsqlt.org/user-guide/quick-start/#InstallToDevDb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Third, run &lt;code&gt;tSQLt.class.sql&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;These 3 steps will install &lt;code&gt;tSQLt&lt;/code&gt; on your database.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Creating a Test Class&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A Test Class is basically a database schema with some special
   properties applied so that &lt;code&gt;tSQLt&lt;/code&gt; can recognize them as a test class.&lt;/li&gt;
&lt;li&gt;A Test Class can contain many Test Cases. &lt;em&gt;(Note: A Test Case is
   nothing but a Stored Procedure.)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;To create a Test Class, we must run below command. &lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="lang-sql"&gt;EXEC tSQLt.NewTestClass 'MyTestClass'; 
GO&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Creating a Test Case&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Creating a test case is easy. You only need to create a stored
   procedure on your test class schema.&lt;/li&gt;
&lt;li&gt;The procedure name must begin with &amp;quot;test&amp;quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Running Test Cases&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RunAll&lt;/strong&gt; - RunAll executes all test cases on all test classes. 
&lt;ul&gt;
&lt;li&gt;i.e &lt;code&gt;EXEC tSQLt.RunAll;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; - Run is a versatile procedure for executing test cases. It can
   be called in three ways: 	
&lt;ul&gt;
&lt;li&gt;With a test class name	&lt;/li&gt;
&lt;li&gt;With a qualified test case name (i.e. the schema name and the test    case name)&lt;/li&gt;
&lt;li&gt;With no parameter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Creating a Test Class, Test Case &amp;amp; Running them all -
   https://tsqlt.org/130/creating-and-running-test-cases-in-tsqlt&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Important Points:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Every individual test cases are wrapped in a transaction which is rolled back at the end of the test.&lt;/li&gt;
&lt;li&gt;How Test Cases are executed by tSQLt -
   &lt;a href="https://tsqlt.org/user-guide/test-creation-and-execution/"&gt;https://tsqlt.org/user-guide/test-creation-and-execution/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
      <pubDate>Fri, 22 Mar 2019 03:56:59 Z</pubDate>
      <a10:updated>2019-03-22T03:56:59Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1423</guid>
      <link>http://13.90.210.135/blogs/how-to-use-materialize-css-in-angular-application/</link>
      <title>How to use Materialize CSS in Angular application</title>
      <description>&lt;p&gt;To install &lt;a href="https://materializecss.com/"&gt;Materialize&lt;/a&gt; in your angular app. You just need to follow 2 steps.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://13.90.210.135/media/1087/materialize.png" alt="Materialize CSS in Angular" /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install the &lt;code&gt;materialize-css&lt;/code&gt; node package in your application.  &lt;pre class="
language-javascript"&gt;&lt;code&gt;npm install materialize-css --save&lt;/code&gt;&lt;/pre&gt; This will install &lt;a href="https://materializecss.com/"&gt;Materialize CSS&lt;/a&gt;. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open &lt;code&gt;angular.json&lt;/code&gt; file &amp;amp; add below styles &amp;amp; scripts.&lt;/p&gt;
&lt;pre class=" language-javascript"&gt;&lt;code&gt;"styles": [
          "./node_modules/materialize-css/dist/css/materialize.css",
        ],
"scripts": [
          "./node_modules/materialize-css/dist/js/materialize.js"
        ]&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;You are done. Now re-run your application.&lt;/li&gt;
&lt;/ol&gt;
</description>
      <pubDate>Fri, 01 Feb 2019 04:41:44 Z</pubDate>
      <a10:updated>2019-02-01T04:41:44Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1420</guid>
      <link>http://13.90.210.135/blogs/solution-the-following-untracked-working-tree-files-would-be-overwritten-by-merge/</link>
      <title>Solution: The following untracked working tree files would be overwritten by merge</title>
      <description>&lt;p&gt;Below, I have mentioned both root-cause &amp;amp; solution of above error.&lt;/p&gt;
&lt;h2&gt;Root Cause:&lt;/h2&gt;
&lt;p&gt;It seems that the files you want to ignore are already committed into the repository. And &lt;code&gt;.gitignore&lt;/code&gt; doesn't actually ignore the files which are already committed into the repository.&lt;/p&gt;
&lt;p&gt;Note that here &lt;strong&gt;untracked working tree files&lt;/strong&gt; means that git is considering these files as untracked because &lt;code&gt;.gitignore&lt;/code&gt; file have their entries. &lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;You can fix this issue by following below easy steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new feature branch or separate branch.&lt;/li&gt;
&lt;li&gt;Delete the files which you actually want to ignore.  (i.e. files mentioned in &lt;code&gt;.gitignore&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Commit these deleted files &amp;amp; push the code.&lt;/li&gt;
&lt;li&gt;Now, raise the pull-request to merge this feature branch in your actual main branch.&lt;/li&gt;
&lt;li&gt;Now, this issue has been fixed in main branch. You won't get this issue again. &lt;/li&gt;
&lt;/ol&gt;
</description>
      <pubDate>Wed, 16 Jan 2019 09:26:29 Z</pubDate>
      <a10:updated>2019-01-16T09:26:29Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1404</guid>
      <link>http://13.90.210.135/blogs/understand-authentication-and-authorization-in-web-applications/</link>
      <title>Understand Authentication and Authorization in Web Applications</title>
      <description>&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt; - As Web API (Rest API) is stateless, so there should be some mechanism by which a server can identify the user in every request. So to enable a user's identity to a web-server, we pass some data in headers in each web-request to the server. The server reads that data &amp;amp; understand to identify the user. This process of identifying the user &amp;amp; ensuring that he is a valid one is known as Authentication. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authorization&lt;/strong&gt; - Now once we know that user is authenticated but we don't know how much access rights this particular user have over the application. So, the authorization is the process of giving access rights to a user. &lt;/p&gt;
</description>
      <pubDate>Tue, 25 Dec 2018 09:26:15 Z</pubDate>
      <a10:updated>2018-12-25T09:26:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1403</guid>
      <link>http://13.90.210.135/blogs/token-based-authentication-in-web-api-2-using-owin/</link>
      <title>Token Based Authentication in Web API 2 using OWIN</title>
      <description>&lt;p&gt;In this post, we will learn how to secure Web APIs by implementing  Token Based Authentication &amp;amp; Authorization in them.  You can refer &lt;a href="http://coderjony.com/blogs/understand-authentication-and-authorization-in-brief/"&gt;this post&lt;/a&gt; to understand what is Authentication &amp;amp; Authorization in web applications.&lt;/p&gt;
&lt;h2&gt;Authentication Methods in Web API&lt;/h2&gt;
&lt;p&gt;Basically, there are two most common methods for Authentication in Rest Based services.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Basic Authentication&lt;/li&gt;
&lt;li&gt;Token Based Authentication (OAuth 2)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can refer &lt;a href="https://www.c-sharpcorner.com/blogs/basic-authentication-in-webapi"&gt;this link&lt;/a&gt; to understand the Basic Authentication. In this post, we will only concentrate on implementing Token Based Authentication in Web API.&lt;/p&gt;
&lt;p&gt;Note that there are several ways to implement token-based authentication. Currently, I am aware of two types of tokens.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JWT Token&lt;/li&gt;
&lt;li&gt;OWIN Based Token&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this post, we will learn about the implementation of OWIN Based tokens. So let's begin the game.&lt;/p&gt;
&lt;h2&gt;Implementing Token Based Authentication in Web API 2 using OWIN&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a new web application project in Visual Studio.
&lt;img src="http://13.90.210.135/media/1073/1-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Select Web API project template.
&lt;img src="http://13.90.210.135/media/1074/2-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Install this Nuget package - &lt;code&gt;Microsoft.Owin.Security.OAuth&lt;/code&gt;. This package is a Middleware that enables the application to support OAuth 2.0 authentication workflow. This package is responsible for generating auth token, validating the token in ASP.NET pipeline &amp;amp; setting up User's identity.
&lt;img src="http://13.90.210.135/media/1075/3-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Now, create an OWIN Startup class. In this class, we will write the code to register the OWIN middleware. Name it &lt;code&gt;StartUp.cs&lt;/code&gt;.
&lt;img src="http://13.90.210.135/media/1076/4-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; &lt;code&gt;Startup&lt;/code&gt; class will look like this initially.
&lt;img src="http://13.90.210.135/media/1077/5-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt;  Now copy below code in &lt;code&gt;StartUp.cs&lt;/code&gt; file to configure OAuth (Token Based Authentication) using OWIN Middleware. Here we registering OWIN OAuth Middleware in the application so that it can be the part of the request pipeline.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;
&lt;code&gt;public void Configuration(IAppBuilder app)
        {
            ConfigureOAuth(app);
        }

        public void ConfigureOAuth(IAppBuilder app)
        {
            OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions()
            {
                AllowInsecureHttp = true,
                TokenEndpointPath = new PathString("/token"),
                AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
                Provider = new CustomAuthorizationServerProvider()
            };

            // Token Generation
            app.UseOAuthAuthorizationServer(OAuthServerOptions);
            app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());

        }
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;After, copying above code, your file will look like this.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://13.90.210.135/media/1078/6-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Now implement &lt;code&gt;CustomAuthorizationServerProvider&lt;/code&gt; class. This is the class in which, we will be validating user's username &amp;amp; password. This is purely a custom class. We can write a custom logic here to validate a user's credentials. We are not using ASP.NET Identity here.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;
&lt;code&gt;
public class CustomAuthorizationServerProvider : OAuthAuthorizationServerProvider
    {
        public override async Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context)
        {
            context.Validated();
        }

        public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
        {

            context.OwinContext.Response.Headers.Add("Access-Control-Allow-Origin", new[] { "*" });

            AuthRepository authRepository = new AuthRepository();
            bool isValid = authRepository.ValidateUser(context.UserName, context.Password);

            if (!isValid)
            {
                context.SetError("invalid_grant", "The user name or password is incorrect.");
                return;
            }

            var identity = new ClaimsIdentity(context.Options.AuthenticationType);
            identity.AddClaim(new Claim(ClaimTypes.Name, context.UserName));
            identity.AddClaim(new Claim(ClaimTypes.Role, "User"));

            context.Validated(identity);
        }
    }
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The file will look like this.
&lt;img src="http://13.90.210.135/media/1079/7-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; This is a demo class I have used in this example. Here, you will be validating the user's credentials from your application's database.
&lt;img src="http://13.90.210.135/media/1080/8-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Now add this Nuget package. If you don't add this, then your &lt;code&gt;StartUp.cs&lt;/code&gt; file won't be executed. So just install the Nuget package - &lt;code&gt;Microsoft.Owin.Host.SystemWeb&lt;/code&gt;.
&lt;img src="http://13.90.210.135/media/1081/9-token-based-authentication-in-web-api-2-using-owin-startup-class-not-called.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 10:&lt;/strong&gt; Build the application to ensure there is no compilation error. Once build is successful, press F5 to launch the application. You will see the application like below in your web browser.
&lt;img src="http://13.90.210.135/media/1082/10-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 11:&lt;/strong&gt; Now, it's time to generate the Access Token. Open postman &amp;amp; fill the information like below image.
&lt;img src="http://13.90.210.135/media/1083/11-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 12:&lt;/strong&gt; Also, make sure to set &lt;code&gt;Content-Type&lt;/code&gt; to &lt;code&gt;application/json&lt;/code&gt;. This is because, we explicitly tell the browser to send the response in JSON format. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This may not be the necessary step, but I just did it.
&lt;img src="http://13.90.210.135/media/1084/12-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 13:&lt;/strong&gt; Once you hit execute button in postman, you will see that your breakpoint in &lt;code&gt;GrantResourceOwnerCredentials&lt;/code&gt; will get hit. In this method, you will verify the user, set his claims. OWIN will take care of the information which you have shared with him. And it will then generate the token from all this information when &lt;code&gt;context.Validated(identity);&lt;/code&gt; will be called.
&lt;img src="http://13.90.210.135/media/1085/13-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 14:&lt;/strong&gt; Now just look at the response in postman. You will see that we have received the access token in the response.
&lt;img src="http://13.90.210.135/media/1086/14-token-based-authentication-in-web-api-2-using-owin.png" alt="enter image description here" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You can access the whole source code from GitHub
-&lt;a href="https://github.com/ankushjain358/TokenBasedAuthenticationUsingOWIN"&gt;https://github.com/ankushjain358/TokenBasedAuthenticationUsingOWIN&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Related Important Links:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/a/34930402/1273882"&gt;Difference between Basic Authentication &amp;amp; OAuth (Token Based
   Authentication)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
      <pubDate>Tue, 25 Dec 2018 08:31:35 Z</pubDate>
      <a10:updated>2018-12-25T08:31:35Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1402</guid>
      <link>http://13.90.210.135/blogs/the-difference-between-encryption-hashing-salting/</link>
      <title>The difference between Encryption, Hashing &amp; Salting</title>
      <description>&lt;p&gt;You might have heard these terms very often – Encryption, Hashing &amp;amp; Salting. In this post, I have tried to explain you all these terms in a very easy way.&lt;/p&gt;
&lt;h2&gt;Encryption&lt;/h2&gt;
&lt;p&gt;Encryption is the process of converting the information from one form to another using an encryption key. Encryption also allows us to recover the original information back using the corresponding encryption key. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Encryption is always done with the intention of recovering the original information back.&lt;/li&gt;
&lt;li&gt;Encryption is a two-way process. It allows us to encrypt as well as decrypt the information.&lt;/li&gt;
&lt;li&gt;Encryption &amp;amp; decryption key remains the same in case of Symmetric Encryption while in case of Asymmetric Encryption, they both are different.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Hashing&lt;/h2&gt;
&lt;p&gt;Hashing is the process of converting information from one form to another, but in case of hashing, information is not recoverable. Once a value is hashed, we can not get the original value from it’s hashed value.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hashing is always done with the intention when we do not want to get
   the original data back.&lt;/li&gt;
&lt;li&gt;Hashing is a one-way process. We can only encrypt a value but can’t
   decrypt it.&lt;/li&gt;
&lt;li&gt;Hashing is mostly used to store passwords. We store the hashed
   password in the database &amp;amp; whenever the user enters his password, we
   hash it &amp;amp; compare it with the hashed password stored in the database.
   If both matches, only then a user is considered authenticated.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Salting&lt;/h2&gt;
&lt;p&gt;Salting is the process of adding additional data to the information before hashing it.
For example, &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; I want to hash my password - &lt;code&gt;Pas$w0rd&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; My Salt is – &lt;code&gt;SALT&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; I will append the salt with password – &lt;code&gt;Pas$w0rdSALT&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Now I will hash this value &lt;code&gt;Pas$w0rdSALT&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Salting with hashing makes your information more confidential &amp;amp; not easily hackable. &lt;/p&gt;
&lt;p&gt;Your Salt should always be very confidential. Though even if someone knows your salt cannot hack your information as hashing is itself very secure. But if an attacker tries various possible passwords &amp;amp; append your salt, then there is a possibility that he might end up with cracking the password.&lt;/p&gt;
</description>
      <pubDate>Thu, 20 Dec 2018 05:46:54 Z</pubDate>
      <a10:updated>2018-12-20T05:46:54Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1401</guid>
      <link>http://13.90.210.135/blogs/solution-systembadimageformatexception-could-not-load-file-or-assembly/</link>
      <title>Solution: System.BadImageFormatException: Could not load file or assembly</title>
      <description>&lt;p&gt;Make sure that you are using the correct tool path (i.e. installutil.exe) for installing the application. This issue normally occurs when we attempt to use 32 bit &lt;code&gt;(/platform:x86)&lt;/code&gt; version of the tool to install a 64 bit application or a 64 bit &lt;code&gt;(/platform:x64)&lt;/code&gt; version of the tool to install 32 bit application.&lt;/p&gt;
&lt;p&gt;Just confirm the path you are using is correct. There is a slight difference in both paths.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v2.0.50727\&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework&lt;strong&gt;64&lt;/strong&gt;\v2.0.50727\&lt;/p&gt;
&lt;/blockquote&gt;
</description>
      <pubDate>Thu, 20 Dec 2018 01:14:44 Z</pubDate>
      <a10:updated>2018-12-20T01:14:44Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1400</guid>
      <link>http://13.90.210.135/blogs/solution-found-a-swap-file-by-the-name-gitmerge_msgswp/</link>
      <title>Solution: Found a swap file by the name ".git/.MERGE_MSG.swp"</title>
      <description>&lt;p&gt;Normally, you get this error message when you are performing GIT operations from two different places. Like I got this issue while I was using Git Bash (Command Line) &amp;amp; Visual Studio together to perform Git operations.&lt;/p&gt;
&lt;h2&gt;Reason:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;This issue occurs when a &lt;code&gt;commit&lt;/code&gt; or &lt;code&gt;merge&lt;/code&gt; session is going on in
   one of the two instances of GIT. &lt;em&gt;i.e. Git Bash &amp;amp; Visual Studio Git.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Both instances try to edit the same file &amp;amp; we get this error message.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;Complete the &lt;code&gt;commit&lt;/code&gt; or &lt;code&gt;merge&lt;/code&gt; session in one of the two opened instances. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: When I got this error message, I found that a window with commit
message text-box was opened in Visual Studio. I just entered the
commit message &amp;amp; committed the code. Later I also closed Git Bash
window as well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Reference: &lt;a href="https://stackoverflow.com/a/13361874/1273882"&gt;https://stackoverflow.com/a/13361874/1273882&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Wed, 19 Dec 2018 05:07:36 Z</pubDate>
      <a10:updated>2018-12-19T05:07:36Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1387</guid>
      <link>http://13.90.210.135/blogs/command-to-list-all-active-channels-in-redis-pubsub/</link>
      <title>Command to list all active channels in Redis Pub/Sub</title>
      <description>&lt;p&gt;In Redis Pub/Sub, we create different Redis channels as per the application requirement. Each application using Redis Pub/Sub will use these channels for either publishing purpose or subscribing purpose. &lt;/p&gt;
&lt;p&gt;Whenever any application publishes a message to a channel, all subscriber client applications which have subscribed to that channel will be notified immediately for that message. &lt;/p&gt;
&lt;p&gt;Below we know about two important commands used in Redis PUB/SUB implementation.&lt;/p&gt;
&lt;h2&gt;Command to list all active channels in Redis Pub/Sub&lt;/h2&gt;
&lt;p&gt;Below command will list out all active channels for connected Redis instance.&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-base"&gt;PUBSUB CHANNELS&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Command to list the number of subscribers subscribed to a Redis channel&lt;/h2&gt;
&lt;p&gt;If you want to know the number of subscribers to a channel, then you can use below command. This will return number of subscribers to a particular channel.&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-base"&gt;PUBSUB NUMSUB channelName&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 10 Dec 2018 23:16:29 Z</pubDate>
      <a10:updated>2018-12-10T23:16:29Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1386</guid>
      <link>http://13.90.210.135/blogs/aspnet-core-notes-for-beginners/</link>
      <title>ASP.NET Core - Notes for Beginners</title>
      <description>&lt;p&gt;ASP.NET Core is a free and open-source web framework, and the next generation of ASP.NET, developed by Microsoft and the community. It is a modular framework that runs on both the full .NET Framework, on Windows, and the cross-platform .NET Core.&lt;/p&gt;
&lt;h2&gt;ASP.NET Core (Key Points)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;ASP.NET Core is a new framework to build and run applications on
   cross platforms. We can develop and host ASP.NET Core apps in all major OS i.e. Windows, Linux or Mac.&lt;/li&gt;
&lt;li&gt;ASP.NET Core is basically a Console Application. It’s the main method
   creates a server or web-host and run this application on that server.&lt;/li&gt;
&lt;li&gt;There are 3 types of projects in ASP.NET Core.  WEB API, ASP.NET Core
   Razor Pages, ASP.NET Core MVC Style&lt;/li&gt;
&lt;li&gt;It has &lt;code&gt;StartUp.cs&lt;/code&gt; class that is being called by the Main method of
   console application.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;StartUp.cs&lt;/code&gt; class is a start-up class that is being invoked when
   the application runs the first time.&lt;/li&gt;
&lt;li&gt;It has mainly two methods &lt;code&gt;ConfigureServices&lt;/code&gt; &amp;amp; &lt;code&gt;Configure&lt;/code&gt; &amp;amp; one
   constructor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ConfigureService&lt;/code&gt; – You can use this method to configure services.
   i.e. ASP.NET Core’s default Dependency Injection.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Configure&lt;/code&gt; – You can use this method register Middleware components in
   your application request pipeline. i.e. Cookie Based Authentication,
   Token Based Authentication, Logging, ExceptionHandling, RouteHandling etc.&lt;/li&gt;
&lt;li&gt;ASP.NET Core removes the concept of using &lt;code&gt;System.Web&lt;/code&gt; and &lt;code&gt;HTTP Modules&lt;/code&gt;
   to be a part of it’s request pipeline &amp;amp; it becomes possible due to the concept of Middleware.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Request Delegates&lt;/code&gt; or &lt;code&gt;Middleware Components&lt;/code&gt; should be registered in
   Configure Method.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Request Delegates&lt;/code&gt; or &lt;code&gt;Middleware Component&lt;/code&gt; will use extension methods
   i.e. &lt;code&gt;Run&lt;/code&gt;, &lt;code&gt;Use&lt;/code&gt; &amp;amp; &lt;code&gt;Map&lt;/code&gt;. These may be anonymous methods also. (Extension
   Method of &lt;code&gt;IApplicationBuilder&lt;/code&gt; class)&lt;/li&gt;
&lt;li&gt;In ASP.NET Core, Middleware is the replacement of HTTP Modules in ASP.NET
   4.x or below.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OWIN&lt;/code&gt; is a Middleware for ASP.NET.  A replacement of HTTP Modules.&lt;/li&gt;
&lt;li&gt;KATANTA is a project that contains many OWIN Middleware Components
   that has been developed by Microsoft team.&lt;/li&gt;
&lt;li&gt;The goal of OWIN is decoupling asp.net web applications from IIS. With
   the help of OWIN Middleware Components, the app will not rely on
   &lt;code&gt;System.Web&lt;/code&gt; dll and &lt;code&gt;HTTP Modules&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Few Important Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.telerik.com/featured/understanding-asp-net-core-initialization/"&gt;Understanding ASP.NET Core Initialization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/"&gt;Create a web app with ASP.NET Core MVC using Visual Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/startup"&gt;Application startup in ASP.NET Core&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?tabs=aspnetcore2x"&gt;ASP.NET Core Middleware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=rMA69bVv0U8"&gt;Token Based Authentication with OWIN Middleware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://brockallen.com/2013/10/24/a-primer-on-owin-cookie-authentication-middleware-for-the-asp-net-developer/"&gt;Cookie Based Authentication with OWIN Middleware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/cookie?tabs=aspnetcore2x"&gt;Using Cookie Authentication without ASP.NET Core Identity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=aIkpVzqLuhA"&gt;Building Web APIs with ASP.NET Core 2.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/"&gt;ASP.NET Core Authentication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.c-sharpcorner.com/article/jwt-json-web-token-authentication-in-asp-net-core/"&gt;JWT Token Based Authentication in ASP.NET Core&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
      <pubDate>Sun, 02 Dec 2018 04:46:57 Z</pubDate>
      <a10:updated>2018-12-02T04:46:57Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1380</guid>
      <link>http://13.90.210.135/blogs/solution-rzc-generate-exited-with-code-1-in-visual-studio-2017/</link>
      <title>Solution: rzc generate exited with code 1 in Visual Studio 2017</title>
      <description>&lt;p&gt;I just got this error while publishing my first ASP.NET Core application in Self Contained Deployment mode.&lt;/p&gt;
&lt;h2&gt;Solution&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;One-liner solution to this problem is - Just repair your Visual
Studio.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Though I took some screenshots of repairing steps, I thought attaching those screenshots here might help you.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Search for Visual Studio Installer: &lt;img src="http://13.90.210.135/media/1059/repair-visual-studio-rzc-generate-exited-with-code-1.png" alt="rzc generate exited with code 1 " /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Select repair option &lt;img src="http://13.90.210.135/media/1060/repair-visual-studio-rzc-generate-exited-with-code-2.png" alt="rzc generate exited with code 1 " /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Click on OK &lt;img src="http://13.90.210.135/media/1061/repair-visual-studio-rzc-generate-exited-with-code-3.png" alt="rzc generate exited with code 1 " /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; At the end, restart the system. &lt;img src="http://13.90.210.135/media/1062/repair-visual-studio-rzc-generate-exited-with-code-4.png" alt="rzc generate exited with code 1 " /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After re-starting the system, you will find that issue has been fixed. :)&lt;/p&gt;
</description>
      <pubDate>Fri, 30 Nov 2018 11:14:24 Z</pubDate>
      <a10:updated>2018-11-30T11:14:24Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1379</guid>
      <link>http://13.90.210.135/blogs/get-previous-and-next-page-urls-in-umbraco/</link>
      <title>Get Previous and Next page URLs in Umbraco</title>
      <description>&lt;p&gt;To get previous &amp;amp; next page URLs in Umbraco, you can use below piece of code in your razor view.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;&lt;code&gt;@if(CurrentPage.Previous() != null){
       &amp;lt;a href="@CurrentPage.Previous().Url"&gt;Previous&amp;lt;/a&gt;
}
	
@if(CurrentPage.Next() != null){
       &amp;lt;a href="@CurrentPage.Next().Url"&gt;Next&amp;lt;/a&gt;
}
&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
</description>
      <pubDate>Wed, 28 Nov 2018 11:22:08 Z</pubDate>
      <a10:updated>2018-11-28T11:22:08Z</a10:updated>
    </item>
  </channel>
</rss>