Posts

Showing posts with the label C#

.NET Core 3 officially comes to Windows IoT Core

Image
Finally, the wait is over! Microsoft announced to support .NET Core on Windows ARM32 devices which means .NET Core will be fully supported on Windows 10 IoT Core. Although there have been few hacks to run .Net Core on Windows 10 IoT Core by the support of community  here  which makes .Net Core runtime component available on Windows IoT Core but the SDK was not available so any DLR features were not available nor you could build .NET Core application from within Windows 10 IoT Core. Here is the step-by-step guide on how to create and run .NET Core 3 apps on Windows 10 IoT Core. Step 1: Download .NET Core 3 preview 2 SDK from  here . Step 2: Extract the SDK zip file in C:\Program Files\dotnet\  directory on Windows 10 IoT Core through ftp service ( on windows go to  RUN then type  \\{ip-address}\c$ where{ip-address} is the ip address of windows iot core). Step 3: Open Powershell  in administrator  mode, initialize a Powershell ...

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 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 deployme...

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:...

Microsoft Azure Blob Storage - Managing Blobs and storage containers from C#

Image
This is the part two of Microsoft Azure Blob Storage where we will look into managing Microsoft Azure Blobs from C# and .NET. For this blog, we are going to keep this pretty simple. We will create a new .net console application and add two Nugget packages that make it super easy to work with Microsoft Azure Blobs. Include these two Nugget Packages: WindowsAzure.Storage Microsoft.WindowsAzure.ConfigurationManager Obtain Access keys from Azure Portal  Add it Access Key to App.Config Include Microsoft Azure Storage namespaces using Microsoft.Azure; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; Add a Container in Azure Blob Storage from C# var storageAccount = CloudStorageAccount.Parse(                 CloudConfigurationManager.GetSetting("AzureStorageConnection")); var blobClient = storageAccount.CreateCloudBlobClient(); var container = blobClient.GetContainerReference("m...