Skip to main content

Posts

Setup Azure AD B2C

Azure Active Directory B2C Briefly, Azure Active Directory (Azure AD) B2C is a business-to-consumer identity management service. This service enables you to customize and control how users securely interact with your web, desktop, mobile, or single-page applications. Using Azure AD B2C, users can sign up, sign in, reset passwords, and edit profiles. Azure AD B2C implements a form of the OpenID Connect and OAuth 2.0 protocols. The important key in the implementation of these protocols is the security tokens and their claims that enable you to provide secure access to resources. read more Ingredients for set up an Azure AD B2C resource Ingredients that you need to have in-order to set up an Azure AD B2C Microsoft Azure account with a valid subscription associated. Azure AD B2C tenant resource with necessary policies Directions I hope that you have a Microsoft Azure account with a valid subscription associated. If you don't have an account, create an account with th...

VSTS Package Management

Visual Studio Team Services provide asserts such as source code, builds, releases, etc. You may also know that it is also allowed to add/install extensions to give extra value. Microsoft marketplace  list all the extensions available for VSTS. VSTS Package Management Click this link to download the Package Management extension. You should have admin level permission to install/add an extension. Package Management is an extension that hosts NuGet, npm, and Maven packages in VSTS. This blog post helps you to Create, host, and share packages with your team. I have use NuGet option for this blog post. Create Packages Open your Solution in Visual Studio. Right-click on the desired Project and select Project Property . It will open the Project Property Window. Select Package tab. In that form, you can edit necessary fields accordingly. Most important fields or the required fields filled with default values. Underline felids in the below two screenshots ...

Satellite Assembly in C#

Satellite Assemblies Resource files in Dot Net Resource files are typically used to store any resources in your Dot Net application. Resource file allows you to store images, icons, audio, files, strings and other types of resources. Of cause it is not mandatory to keep them inside a resource file. But when it comes to localization it is recommended to work with the resource file. localization Which means based on the user's language and culture change the application and the resources. How to archive localization with resources? Seems to be an impossible task. But to make the impossible possible, Dot Net provides you a special assembly called "Satellite Assembly" Satellite assemblies are assemblies that containing resources specific to a given language and culture. Using satellite assemblies, you can place the resources for different languages in different assemblies, and the correct assembly is loaded into memory only if the user selects to view the ...

Dynamic Assembly in C#

Static Assembly Vs Dynamic Assembly Static Assemblies are those assemblies which are stored on the disk permanently as a file or set of files. Since these assemblies are stored in the disk, those are only loaded when CLR requests.  These are the assemblies we are dealing with daily. Assemblies that I'm going to talk about today bit different. It completely opposite of the Static Assemblies. Those Assemblies are not stored on the disk before execution. When an application requires any type, which references from these assemblies, DOT NET will create these Assemblies at the runtime so that it will directly load into the memory. Why is it important ? Like I mentioned, this is not something we do very often. It is not all about how important it is. Personally, I think it is better to know this kind of hidden language features. More you play with this more you learn. I found cool stuff I can do with this. Hope it will be same for you as well. This is an old feature. How ...

Getting started with AutoMapper

DTO DTO stands for Data Transfer Object. DTOs are there for transfer data between the different application or different layers within a single application. You can look at them as dump bags of information. The purpose of existence is just getting that information to a recipient. So that recipient doesn't get anything other than they expect. The major problem that I had with this DTO is mapping one object to another. Every place where I need to transfer my data using DTO, either I have to use parameterized constructor or new object initialize to inject the information (data) into it. Recently I found this library called AutoMapper  which made my code awesome. AutoMapper is a simple little library built to solve a deceptively complex problem "getting rid of code that mapped one object to another" . AutoMapper It all started with Source Object and Destination Object to work with (well, that's obvious!). This works best as long as the names of the source ty...

Renaming SQL Server Database

Very recently I was working on a data archival module. Project was almost 10+ years old and it kept very sensitive, huge data set. While testing this, accidentally I have deleted some required records from a shared development database which is not awesome at all. Only option that I had was restoring backup files. But developers who worked with me requested to keep the damage database, since they were not sync schema with the source controller. Only possibility that came to my mind was rename the damaged database and restore backup database with the original name. As all ways I googled it "how to rename a SQL server database", many articles were listed down in my search result but couldn't find a good all in one article. therefore thought of sharing what I learned. Understanding what we are going to do with the rename is important.Mainly this process can divided into three parts, Rename Database Rename Mappings Rename Files Following the order of above thre...

SSAS: Picking The Right Data Types For The Measures

Symptoms You don't see what you expect to see. As an example, you get a negative amount for aggregation in an INT type Measures even though it only contains positive values. To explain this I'll take above mention example. Cause This is most likely caused by the capacity insufficiency of INT data type. Resolution Update Measures' data type to BIGINT (Since that will be the  next large best datatype for INT ). Into the Depth When the data warehouse fact table contains records like below, Record # Amount Month_Key Year_Key Record 1 500000000 2016/Jan 2016 Record 2 500000000 2016/Feb 2016 Record 3 500000000 2016/Mar 2016 Record 4 1000000000 2016/Apr 2016 Record 5 1000000000 2016/May 2016 Record 6 100000000 2016/Jun 2016 Record 7 500000000 2016/Jul 2016 Querying amount for each month will show positive values  The amount for Janu...