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.
Tagged: ASP.Net Core
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.
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.
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.
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.
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).
In this jumpstart, we are going to see how to use Cache and Distributed Cache tag helpers in ASP.Net Core. Cache tags are server side ASP.Net Core tags which are used to cache the contents on the server for better performance. There are various attributes available on the cache tags through which its behavior can be controlled.
In this jumpstart, we are going to see how to use View components as Tag Helpers in ASP.Net Core 1.1. Previously we used to invoke View Components using Component.InvokeAsync method. But starting from ASP.Net Core 1.1, we can use View components as Tag helpers.
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.
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.
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.
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.
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.
.Net Standard Library is a specification through which API portability is achieved on all .Net runtimes. It defines a set of base class libraries which are compatible with all .Net platforms like Windows, UWP, .Net Core, .Net Framework, Windows Phone etc. Using BCL’s, developers can write custom portable API and use them across different .Net platforms.
In this tutorial, we are going to see how to support versioning for ASP.Net Core 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. In previous versions of ASP.Net, we used to create a custom IHttpControllerSelector through which we will route the request to appropriate controller version based on custom header or URL pattern. In ASP.Net Core, we will use aspnet-api-versioning middleware (created by Chris Martinez).
In this tutorial we are going to demystify the contents of Publish folder of an ASP.Net Core MVC application. To host an ASP.Net Core Application, we publish it using dotnet publish command of Dotnet CLI. Publish folder is created as an output of dotnet publish command and it contains all the necessary dependencies along with project artifacts for successful project hosting.
In this tutorial, we are going to see how to publish an ASP.Net Core 1 Application to IIS. Unlike older versions of ASP.Net, ASP.Net Core 1 applications are not dependent on IIS for hosting. In fact ASP.Net Core 1 applications are console applications and run in their own Kestrel Web Server. But if we need to have more functionalities which IIS provides by default (or through extensions), then we can use IIS as reverse proxy which will forward requests to Kestrel.
In this jumpstart we are going to see how to set Environment variables in ASP.Net Core MVC application. This is new feature in ASP.Net Core and primarily used for configuring the behavior across multiple environments likes Development, Staging and Production. We can also add extra environment variables and access them in application using IConfigurationRoot.
Caching helps in improving performance of an application by replicating the data (otherwise which has to be fetched from database or any other source). ASP.Net Core supports both in-memory and distributed caching. In-memory caching holds the copy of data in local server’s memory, where as distributed cache maintains cache in a centralized location which is accessible by servers in cluster. In this tutorial we are going to see how to implement both in-memory and distributed caching in ASP.Net Core MVC application.
In this Jumpstart, we are going to see how to use Redis Distributed Cache Server as Session store for an ASP.Net Core Application. There are multiple advantages in having a distributed cache storage (in this case it is Redis Cache) acting as Session store. Sessions can be shared across multiple applications and also between multiple servers in a cluster. Redis is also capable of supporting different data types and it is faster than SQL Server (because of its in-memory nature). Redis also supports cluster for scaling and persistence to disk (data will not be lost on server restarts).