Posts

Showing posts from January, 2019

Setting up CI and CD pipeline in Azure DevOps for ASP.NET Core and Azure Web Apps

Image
In the last post I talked about Azure DevOps , now we will look into a practical use case of Azure DevOps where we will setup a complete continuous integration (CI) and continuous deployment/delivery(CD) pipeline for a ASP.NET Core project hosted on Azure Web Apps . We will host our project solution on Azure Repo . The basic idea is that we will create an Azure Web app, setup our project on Azure Repo, create CD & CD pipeline on Azure DevOps, and see things in action when we push our code to master branch. Let's get started: Open Azure portal  and go to App Services and click on Create app service .  From the Marketplace templates, choose Web App . Click Create . Choose an app service name that is available, select OS be Windows, Publish by code, then choose an app service plan that fits your budget and click Create . Once the service is deployed, you will get a ntoification, open it and click Go to resource . Here you can see live l

Microsoft Azure DevOps : A Complete CI & CD solution in the cloud

Image
Microsoft announced Azure DevOps in last Quater of 2018. When it comes to project planning, project management, continuous integration (CI) and continuous delivery/deployment (CD) for agile practices, DevOps has always been a hot topic  so Microsoft decided to take the lead with a powerful cloud platform that makes everything available in a single place. No matter what platform or language or repository system your solution is, Azure DevOps got you covered with tools that work cross-platform. The services provided by Azure DevOps help developers build high quality software faster. The core services provided are:  Azure Pipelines Azure Boards Azure Artifacts Azure Repos Azure Test Plans Azure Pipelines Azure DevOps provides Azure pipelines to manage CI/CD tasks that supports any language, platform, and cloud. You can connect to a any Git repository and setup CI/CD workflow. Azure DevOps makes it incredibly easy to setup building, testing, and deployment workflow to

Understanding Powershell ExecutionPolicy and securing Powershell CmdLets/Scripts with Code-Signing Certificate

Image
One of the great things about Powershell is that its powerful and at the same time very safe. Powershell script cannot be executed as is unless user provides permission to execute PS script/cmdlet/module. This is generally set through Powershell Execution Policy. There are four types of Execution Policy : Allsigned RemoteSigned Restricted Unrestricted AllSigned  - Scripts will run only if they have been signed by a trusted publisher. RemoteSigned  - Scripts created locally will run, but those downloaded from the Internet will not (unless they are digitally signed by a trusted publisher). Restricted  - Scripts won’t run. Unrestricted  - Scripts will run regardless of where they have come from and whether they are signed. Ideally, all PS scripts should be digitally signed by a code-signing certificate. But in case, you don't want to buy an expensive code-signing certificate from a Certification Authority (CA), you can create a Self-Signed certificate and then add it

Implementing Basic and JWT Token authentication with C# .NET

Image
Authentication is probably the first thing you will encounter when building a secure Enterprise application and understanding how you can authenticate your application with different authentication protocols including third party authentication flows is really important. Whether you are building an app with ASP.NET, ASP.NET Core, WPF, UWP, Xamarin.Forms Xamarin Android, Xamarin iOS or .NET Core , all these frameworks provides client side networking libraries managed under System.NET namespace. Among all the classes  HttpClient has significant important. It can handle both HTTP and HTTPS connections. The beauty of this class is that it provides both hight level api and low level modification options to work with HTTP connections and you can make any modification  within the pipeline like handling HTTP message request/response, filtering, certificates, authorization and much more. In a nutshell, over HTTP most of the times you will work with two kinds of authentication: 1) Basi

Microsoft Azure Trail Account and Free Services

Image
I have seen a lot of confusion in folks that are new to Microsoft Azure Cloud world about what services are free and how to best utilize trail subscription and free services so I thought to put it into an article here. In a nutshell, Microsoft Azure provides free trial account that has: $200 credit to spend for the first month on all services 12 months of free services Always free services To register a free trial account you need to have a credit card (debit cards won't work) and provide its details to at the time of registration (Azure will run a test transaction of $1 but don't worry they will revert it immediately after transaction is successful). This gives you a subscription to the trial account. You can also see it under your portals subscription section. Now here is something that people often miss out, once you activate MS Azure Free Trial  you get $200 to spend just for the 1 month and after that trial subscription expires. To avail free services yo