Category: ARTICLE

Gives Indepth insight of concepts – Long and Deep

0

Migrate ASP.Net Core Application from XProj/Project.json to CSProj/MSBuild

In this tutorial, we are going to see how to migrate an existing ASP.Net Core Web Project which is based on XProj and Project.json to support new CSProj and MSBuild tooling. ASP.Net Core is a ground up design and to support multiple environments and platforms, ASP.Net team decided to go with XProj/Project.json approach which is light-weight and easy to modify dependencies, target frameworks etc. But the interoperability between different .Net Application Models (which are based on CSProj and MSBuild) with ASP.Net Core Applications faced challenges.

2

Create and Run a Docker Container for ASP.Net MVC4 Application using Azure Windows Server 2016 VM

In this tutorial, we are going to see how to create a Docker Image for an ASP.Net MVC4 application. We will containerize the created image, run it locally and test it. For hosting an ASP.Net MVC4 application we need IIS, so we need a Windows Container (IIS doesn’t run on Linux container). To work with Windows Containers, we need either Windows 10 (Anniversary update) or Windows Server 2016. We are going to use Windows Server 2016 Datacenter VM running in Azure as our development environment.

0

JumpStart # 52 – Getting started with Docker on Azure Windows Server 2016 Datacenter–With Containers Virtual Machine

In this jumpstart, we are going to see how to create a Docker enabled development environment using Windows Virtual Machine running in Azure. Typically when we create a Windows 10 VM and try to install Docker on it, it will fail with error Unable to write to the database. Exit code: 1. Docker staff confirmed that Docker for Windows is not expected to work in Azure VM or any other VM’s guest environment, unless the host/guest combo supports nested virtualization.

0

Continuous Integration and Deployment of ASP.Net Core 1.0 Docker Image to Azure Ubuntu Virtual Machine using GitHub and Docker Cloud

In this tutorial, we are going to see how to get continuous integration and continuous deployment of a Docker image created for ASP.Net Core 1.0 Application to an Azure Ubuntu Virtual Machine. We are going to use GitHub as version control repository where our application code along with Docker file resides. We will use Docker Cloud to automatically build images on every code push to the GitHub repository. Finally we will configure Docker cloud to build the latest image and deploy the Docker container to an Azure Ubuntu Virtual Machine.

0

Deploy an ASP.Net Core 1.0 Docker Image to Azure Ubuntu Virtual Machine

In this tutorial, we are going to see how to deploy a Docker image created with ASP.Net Core 1.0 Application to an Ubuntu Virtual Machine created in Microsoft Azure Cloud. Docker helps us in creating packages for our application into standard images. These Docker images are ready to be deployed on Docker Containers and can run on any environment.

0

Create and Deploy Docker Container of ASP.Net Core 1.0 Application to Azure Linux Web Application

In this tutorial, we are going to see how to create and deploy a Docker Image for an ASP.Net Core 1.0 Application. At the end of this tutorial we are going to deploy the Docker image to Azure Linux Web App. Docker helps us in creating packages for our application into standard images. These Docker images are ready to be deployed on Docker Containers and can run on any environment. A Docker Image is a read-only template with instructions for creating a Docker container. A Docker Container is the execution environment and it is created from a Docker image.

0

JumpStart # 51 – Dependency Injection into Views in ASP.Net Core

In this jumpstart, we are going to see how to inject dependencies into a View in ASP.Net Core. This feature is extremely useful when we need to use certain functionality or data in views and without including them in regular controller models. For example, populating master data to some controls like select, formatting different data and using application wide features like Globalization and localization.

0

JumpStart # 50 – User Secrets in ASP.Net Core

Most of the time we maintain project specific confidential credentials like Database connection strings, passwords etc., in configuration files. This sensitive information will be pushed to source version control servers like Team foundation server with regular check-ins. This is a bad practice because the sensitive information will be at risk (especially in case of public repositories).

4

Reusable View Components in ASP.Net Core 1.1

In traditional ASP.Net MVC, we achieve reusable user interfaces through Partial Views. Starting with ASP.Net MVC Core, we have View components replacing the concept of Partial Views and Child only Actions. View Components can be in their own class libraries and can be referenced by multiple web projects. View Components are more independent as they are not coupled with Controllers.

0

Cookie based TempData Provider in ASP.Net Core

TempData in ASP.NET MVC is used to store temporary data which can be used in the subsequent request. Data stored in TempData will be cleared once it is accessed, we need to call TempData.Keep() explicitly to retain values. The default TempData implementation in ASP.NET MVC is based on Session. In ASP.Net Core, we have a provision to use Cookies as storage for TempData.

0

Middleware Filters in ASP.Net Core

In ASP.Net Core, Middlewares are configured and executed as part of global request pipeline and are executed on every Controller action execution. Starting with ASP.Net Core, we can apply middlewares to specific controllers and actions. In this tutorial, we are going to see how to use middlewares as filters on specific controller actions.

0

Response Caching in ASP.Net Core

Response Caching helps in improving performance of web server by caching relevant content based on certain criteria. Response caching is available in all versions of ASP.Net. In ASP.Net Core, there is a new Response Caching Middleware through which we can configure the caching options in Startup class. In this tutorial, we are going to see how to implement Response Caching middleware.

0

Upgrading from ASP.Net Core 1.0 to ASP.Net Core 1.1

We have ASP.Net Core 1.0 along with .Net Core 1.0 SDK for quite some time. Microsoft recently released ASP.Net Core 1.1 along with .Net Core 1.1 SDK. There are many new improvements as part of the new release which includes middlewares like URL Rewriting, Response Caching etc., and improved deployment and hosting capabilities. In this tutorial, we are going to see how to install and get started with ASP.Net Core 1.1.

0

Convert an ASP.Net MVC Webpage HTML to PDF

Converting a webpage or plain HTML to PDF helps in sharing the visualized data through different channels like email attachments etc., In this tutorial we are going to see how to convert an ASP.Net MVC Webpage or plain HTML to PDF document. We will use SelectPDF Community edition to convert an ASP.Net MVC View to PDF. There are many other options to convert HTML to PDF, but SelectPDF is easy to integrate with MVC application and its API can handle HTTP Cookies, HTTP Headers etc with good performance.

4

Display session expire popup in ASP.Net MVC

In this tutorial, we are going to implement session expiry popup in an ASP.Net MVC application. It is most common requirement to alert user by showing a warning popup ahead of time before the actual session expires. We use Timeout-dialog.js JQuery plugin by Rodrigo Neri (We specifically take Michael Khalili’s timeout-dialog’s fork) to show the session expiry popup. Popup will be having an option to stay signed-in otherwise user will be logged out on Session expiration.

0

ASP.Net Web API Versioning

In this tutorial, we are going to see how to support versioning for ASP.Net Web API endpoints. Versioning helps API owners to roll out enhanced functionalities to different customers on a time to time basis without breaking the old versions of endpoints. Usually we achieve versioning in Web API by creating a custom IHttpControllerSelector through which we will route the request to appropriate controller version based on custom header or URL pattern. Thanks to Chris Martinez for creating aspnet-api-versioning nuget, through which versioning was made easy.

0

Create Nuget package from .Net Core 1 Class Library

In this tutorial we are going to see how to create a Nuget package from .Net Core 1 Class Library project. In previous versions of .Net, creating a nuget from class library is a big task which involves in adding build artifacts and dependencies. Starting from .Net Core, creating a nuget package made simpler and it is supported by Dotnet CLI.