:::: MENU ::::

User Secret management in ASP.NET Core

.Net Core introduces secret manager tool to store user secrets during development which helps developer to manage secrets and other sensitive settings during development in different space/file rather than on appsettings.json. You shouldn’t store id, secret keys, passwords or any other sensitive data in source code instead you have to store it other separate file and for this secret manager tool comes to be a handy tool. It helps to prevent sensitive data from being checked in by source control. ASP.NET Core also use this tool to manage user secrets during development. With secret manager tool you can associate app secrets with a specified project and share them across multiple projects. User secrets are stored as JSON data (like you see on appsettings.json).

Continue Reading


Dependency Injection in ASP.NET CORE

First let’s know about what is Dependency Injection and why we need this.

Dependency injection is a software design pattern that implements inversion of control for resolving dependencies. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) that would use it. DI is widely adopted because this technique helps developer for achieving loose coupling between objects and its collaborators, or dependencies. Rather than directly instantiating collaborators, or using static references, the objects a class needs in order to perform its actions are provided to the class in some fashion. Mostly there are three common approach to achieve DI Setter, Interface, and Constructor. [Wikipedia]

Continue Reading


Adventure with .NET Core

.Net Core 1.0 is RTMed along with ASP.NET Core 1.0, EntityFramework 1.0 and Visual Studio 2015 update 3 on June 27 2016. For .Net developer this is an awesome moment not only due to RTM of another product but its more than that. “This” .NET Core runs every where, can develop application from editor of choice, able to work with dotnet cli etc. etc.

Continue Reading


Password hashing in C#

As a developer you probably had to make user account system where you kept user login credentials (along with other personal details). If you are still using old style like storing password in plain text or using any other weak password encryption technique like AES then your user’s data is in risk. That’s an easy way for hacker. So hashing is another secure crypto technique/algorithm to implement for security.

Continue Reading


ASP.NET session state management with Azure Redis Cache

HTTP is a stateless protocol. To allow users save to state information across requests, ASP.NET provides Session storage. The session variables are stored on per-user basis. In ASP classic, you can store session variables only in the Web server’s memory. However, this approach proves to be poor in terms of scalability and reliability. In later versions of ASP.NET you can customize the session state store as per your requirement. This article will explore one of the scalable and reliable approaches for storing session variables — Azure Redis Cache.

Continue Reading