Category: JumpStart

Tutorials which are short and straight

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

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

0

JumpStart # 45 – Redis Cache based Session State 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).

0

JumpStart # 44 – SQL Server based Session State in ASP.Net Core MVC Application

In this Jumpstart, we are going to see how to use SQL 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 SQL Server) acting as Session store. Sessions can be shared across multiple applications and also between multiple servers in a cluster. There are also some disadvantages around performance (in-memory is faster than SQL Server based session store) and operational overheads of maintaining additional SQL Server database.

0

JumpStart # 43 – Understanding Program and Startup classes in ASP.Net Core Application

Program and Startup classes are breaking changes in ASP.Net 5 (although they are existed in unified Startup class, in ASP.Net Core they are diverged into separate classes) which are used to start the application and support application’s HTTP pipeline. In previous versions of ASP.Net we have Global.asax which exposes different events at application life cycle level. In this jumpstart, we are going to see what is the relevance of both classes in ASP.Net Core Application.

0

JumpStart # 42 – Download file in ASP.Net MVC

In this jumpstart, we are going to see how to download a file from server to client browser in ASP.Net MVC using a RouteHandler . A RouteHandler will be created to handle all the requests made to a particular URL with specific route data (part of URL itself) to identify the file requested and will return a particular HttpHandler for the request. HttpHandler is going to find the file on the server, set it into the Response of HttpContext and finally send the response back to the client (typically a browser, but it can be anything).

0

JumpStart # 41 – Browser Link in ASP.Net Core MVC Application

Browser Link is a feature of Visual Studio (from 2013) which will help in refreshing web application in different browsers at once in debug mode. Browser Link uses SignalR to establish a communication channel between Visual Studio and browser. When browser link is in use, Visual Studio acts as SignalR Server and browsers will act as clients and any new changes will be propagated to browsers just with a button click in VS.

0

JumpStart # 37– Get the list of all AzureWebsites Cmdlets

In this short jumpstart, I am going to show how to get list of all AzureWebsites Cmdlets from latest Microsoft Azure PowerShell – May 2015 release. This jumpstart is the starting point of series of blog posts which will narrate different automation techniques involved around AzureWebsites. As the first step, we get list of AzureWebsites cmdlets and keep them as a reference.

0

JumpStart # 36– Access IIS Express Localhost URL outside development machine on any other Remote device within same Network

In this short Jumpstart, I am going to show on how to access IIS Express (Visual Studio Development Server) Localhost URL outside the development machine on any other device which is connected to the same network as of Development machine. This would help us in saving lot of time in testing the application on different devices with different form factors. We often use emulators to test the behavior of our application, though this approach would give prospective results, one cannot trust emulators with 100% confidence (take an example of File upload). If there was a way to directly access the application (without hosting it, directly from development server) on the remote devise of interest, we can test and be confident about application usage.

0

JumpStart # 35– Prevent Visual Studio Node.js Console closing immediately after execution

In this JumpStart I am going to show how to prevent closing of Visual Studio’s Node.js console window immediately after execution. When we create a blank Node.js Console application in Visual studio and run the application (either by clicking Start button or by pressing F5), app.js will execute and results will be printed, but the console will not wait by default for programmer to check results. This is the same default behavior as of C# console application, where we can by-pass it by using a simple Console.ReadLine() statement. But in Node.js project, we have other simple options which are discussed in this JumpStart.

0

JumpStart # 33– Ignore a property of Model from EditorFor Scaffolding in ASP.Net MVC

In this JumpStart, I am going to show on how to prevent automatic scaffolding of a Model Property while using @Html.EditorFor extension in ASP.Net MVC.

Many times we might create a Model (what I was referring here is a typical ViewModel) which will have properties for internal usage of Controller/Business layer. That means they are not intended to display on UI. But when we use @Html.EditorFor, even those properties will be scaffold automatically and displayed on UI.

2

JumpStart # 32– Prevent ASP.Net Page to load in Cross-domain IFrame

In this short jumpstart, I am going to show how to prevent loading of an ASP.Net MVC page in a cross domain iframe using traditional HttpModules. We use HTTP header “X-Frame-Options” to prevent the loading of page in iframe, but instead of injecting this header on every code file, we use a HttpModule to configure this header as a site wide option. Here we use X-Frame-Options to “Same Origin” so that iframe requests from same domain will be served and rest all ignored.

5

JumpStart # 31– Create and deploy new Azure Cloud Service using Package (CSPKG) generated by Azure PowerShell

In this short tutorial, we are going to learn how to create new Azure Cloud Service deployments through Windows Azure PowerShell cmdlets. Deployment though PowerShell can be achieved by first creating a package (CSPKG) for the Visual studio project which is intended to be deployed. As a second step we upload the package to a Windows Azure Blob Storage. Finally we create a new Azure Cloud Service and deploy the uploaded package to it.