Home > Asp.net MVC

Creating Azure B2C users using Graph API in .Net Core App

This article will help to understand Azure B2C user create operation using .net core application. Below are steps for application setup on Azure Portal Go to Azure Portal https://portal.azure.com/ From All Resources find Azure B2C. Go to App Registrations and register the new application. Create new client secret that we are going to use to

This Article is TAGGED in , , , . Read more

ContentFul: create asset for the uploaded file using .Net Core

When we upload a file in contentful, then it must be linked with an asset, other wise the uploaded file cannot be viewed or linked to an entry. Below are the steps mentioned that must be followed serially: 1) Upload the file in contentful from Blob Storage [crayon-6649e374b6c41605850138/] 2) Create asset in contentful

This Article is TAGGED in , , . Read more

Refresh datasource, reset and run indexer using .NET Core and RestSharp

In this article, we are going to demonstrate the steps to refresh the data source, reset and run indexer in an azure cognitive search using .Net Core and RestSharp. Since we are going to refresh the data source and the data source here we are referring to is of type

This Article is TAGGED in , , , . Read more

Log Errors and store in database using NLog

Nlog is an open source log platform through which we can log an activity of an application and store in file, database and even in azure blob storage. Install following NuGet packages in your project: 1. Install-Package NLog-Version 4.7.10 2. Install-Package NLog.Web.AspNetCore- Version 4.12.0 3. Install-Package Microsoft.Data.SqlClient- Version 3.0.0 4. Install-Package Microsoft.Extensions.Logging.Console- Version 5.0.0  Create nlog.config file

This Article is TAGGED in . Read more

Alphanumeric Sort Using PadNumbers

Problem Statement: Sort the Alphanumeric values Solution : below is the Code that helped to sort the alphanumeric values Example : you have the list var List = {a1,ba3,aa2,a2,ba2,aa3}; we can not sort this directly using [crayon-6649e374b8121856146558/] so to sort this we need to PadNumbers to value and then sort the List. with the help

This Article is TAGGED in , , . Read more

Backup and restore SQL Database to Azure Blob Storage Service in C#

Microsoft Azure Blob Storage is a scalable, online cloud data storage service that stores data blobs in containers. This article helps you understand how to write backups to and restore from the Azure Blob Storage Service and to do so we will create an Azure Blob Container, credentials for accessing the

This Article is TAGGED in , , , , , . Read more

Format of data from controller to set different colors for each column in highcharts

If there is case where it is necessary to distinguish data based on color e.g if data is below specified number it should be in red color and above it in green color. In that case data to the highcharts should be with color code. [crayon-6649e374b8b8b542539470/] In method getColor1(int a), you can

This Article is TAGGED in , . Read more

MaxJsonLength exception in ASP.NET MVC during JavaScriptSerializer

Problem Statement:  The following exception (error) occurs in ASP.NET when AJAX calls are made to PageMethod using jQuery AJAX or ScriptManager Error during serialization or deserialization using the JSON JavaScriptSerializer. "The length of the string exceeds the value set on the maxJsonLength property." Below code that helped to resolve the issue. Instead of

This Article is TAGGED in , . Read more