Posted by Anuraj on Saturday, July 16, 2016 Reading time :3 minutes
ASP.NET Core OAuth 2 Authentication Slack
This post is about implementing authentication with Slack. Similar to Linkedin or GitHub, Slack also supports OAuth 2 protocol for authentication. In this post, for authenticating a user against slack, the generic OAuth middleware is used. To use OAuth middleware you require few details about the OAuth provider.
Posted by Anuraj on Thursday, July 14, 2016 Reading time :1 minute
ASP.NET Core Nuget EF Entity Framework
This post is about reverse engineering model classes from existing database using Entity Framework Core. This is useful in Database First scenarios than the Code First scenario. In order to scaffold a DbContext from an existing database, you first have to set up project.json file. You need to add reference of Entity Framework tools in the project.json file tools section. For this post I am generating DbContext and model classes from Sqlite Database. So I am using EF Sqlite references as well.
Posted by Anuraj on Tuesday, July 12, 2016 Reading time :1 minute
ASP.NET Core Nuget
While developing ASP.NET Core you might face some situations where you have the source code with you, but the nuget package is not available. One example is ImageProcessorCore where source code is available, but nuget package is not available, if you want to use this library in your project, you first need to create a package out of it and host it locally.
Posted by Anuraj on Saturday, July 2, 2016 Reading time :2 minutes
ASP.NET Core PostgreSQL EF Migration
This post is about using PostgreSQL with ASP.NET Core. PostgreSQL is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. Recently in ASP.NET Forums, someone asking about using postgresql with ASP.NET Core. Since I don’t have an installed version available, I thought I will use postgresql as a service version from elephantsql.com. They are offering a free tier postgresql database. You can register yourself and can create databases. In this post I am using EF Migrations for creating databases. So I am using a ASP.NET Core Web API project, I have created a API project with ASP.NET YO Generator. To connect to postgresql server, you require “Npgsql.EntityFrameworkCore.PostgreSQL” nuget package, and for EF migrations you require “Microsoft.EntityFrameworkCore.Tools” package. Here is the project.json file.
Posted by Anuraj on Wednesday, June 29, 2016 Reading time :2 minutes
ASP.NET Core Bundling Minification
Posted by Anuraj on Tuesday, June 28, 2016 Reading time :2 minutes
ASP.NET Core Nginx Reverse Proxy Load balancing
This post is about running your ASP.NET Core application with Nginx as reverse proxy on Windows. Nginx is a web server. It can act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache. Nginx runs on Unix, Linux, BSD variants, OS X, Solaris, AIX, HP-UX, and Windows. Released under the terms of a BSD-like license, Nginx is free and open source software. Few months back on K-MUG Techday, on a NodeJS session, I asked the question about using NodeJS in enterprise project, then I got introduced to Nginx and reverse proxy concepts in NodeJS. Similar to Node, ASP.NET Core is also supports the Kestrel hosting than IIS, it can be also used along with Nginx and can be hosted in Linux as well..
Posted by Anuraj on Tuesday, June 28, 2016 Reading time :1 minute
C# ASP.NET ASP.NET Core Docker Container
This post is about running your ASP.NET Core application on Docker for Windows. Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. Recently Docker introduced Docker for Windows and ASP.NET Team came up with Docker support for ASP.NET Core as well. To deploy ASP.NET Core application, first you need to download the docker for Windows. You can get it from here.