November 22nd, 2016

Notes from the ASP.NET Community Standup – November 1, 2016

Maria Naggaga
Senior Program Manager

This is the next in a series of blog posts that will cover the topics discussed in the ASP.NET Community Standup. The community standup is a short video-based discussion with some of the leaders of the ASP.NET development teams covering the accomplishments of the team on the new ASP.NET Core framework over the previous week. Join Scott HanselmanDamian EdwardsJon Galloway and an occasional guest or two discuss new features and ask for feedback on important decisions being made by the ASP.NET development teams.

Each week the standup is hosted live on Google Hangouts and the team publishes the recorded video of their discussion to YouTube for later reference. The guys answer your questions LIVE and unfiltered. This is your chance to ask about the why and what of ASP.NET! Join them each Tuesday on live.asp.net where the meeting’s schedule is posted and hosted.

ASP.NET Community Standup 11/01/2016

Community Links

Puma Scan is a software security Visual Studio analyzer extension that is built on top of Roslyn.

Plug ASP.NET Core Middleware in MVC Filters Pipeline 

Building An API with NancyFX 2.0 + Dapper

.NET Standard based Windows Service support for .NET 

Accessing the HTTP Context on ASP.NET Core

Accessing services when configuring MvcOptions in ASP.NET Core 

Adding Cache-Control headers to Static Files in ASP.NET Core 

Building .Net Core On Travis CI

Umbraco CLI running on ASP.NET Core

Testing SSL in ASP.NET Core

ASP.NET API Versioning 

Creating a new .NET Core web application, what are your options?

Using MongoDB .NET Driver with .NET Core WebAPI

ASP.NET Core project targeting .NET 4.5.1 running on Raspberry Pi

Free ASP.NET Core 1.0 Training on Microsoft Virtual Academy

Using dotnet watch test for continuous testing with .NET Core and XUnit.net 

Azure Log Analytics ASP.NET Core Logging extension

Bearer Token Authentication in ASP.NET Core

ASP.NET Core Module Removal of dnvm scripts for the aspnet/home repo

Demos

ASP.NET Core 1.1  Preview 1  added a couple of  new features around Azure integration, performance and more. In this Community Standup Damian walks us through how he easily upgraded live.asp.net site to ASP.NET Core 1.1, as well as, how to add View Compilation and  Azure App Services.

Upgrading Existing Projects

Before you start using any of the ASP.NET Core 1.1  Preview 1 features makes sued to update the following:

  • Install .NET Core 1.1 Preview 1 SDK
  • Upgrade existing project  from .NET Core 1.0 to .NET Core 1.1 Preview 1. Make sure to also updated your ASP.NET Core packages to their latest versions 1.1.0-preview1.
  • Update the netcoreapp1.0 target framework to netcoreapp1.1.

View compilation

Damian went over how he added View compilation to live.asp.net. Typically your razor pages get complied the first time someone visits the site. The advantage of  View compilation is, you can now precompile the razor views that your application references and deploy them. This features allow for faster startup times in your application since your views are ready to go.

To start using  precompiled views in your application follow the following steps.

  • Add  View compilation package
            "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": {
                "version": "1.1.0-preview4-final",
                "type": "build"
             }
  • Add View compilation tool
             "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": {
                 "version": "1.1.0-preview4-final"
               }
  • Include the post publish script to evoke pre-compilation

Now, that live.asp.net is configured to use view compilation, it will pre-compile the razor views. Once you’ve published your application, you will notice that your PublishOutput folders no longer contains a view folder. Instead, you will see appname.PrecompileViews.dll.

Azure App Service logging Provider

Damian also configured  live.asp.net to use Azure App services.  By adding  Microsoft.AspNetCore.AzureAppServicesIntegration package , and calling the UseAzureAppservices method in Program.cs Diagnostic logs are now turned on in Azure.(see image below).

appservices-logging-150 With Application Logging turned on, you can choose the log level you want and see them in Kudu console, or Visual Studio. (see image below)

appservices-viewlogginginkuduconsole-150
Application Logs in Kudu

This week Damian went over how to use some of the new features in ASP.NET Core 1.1  Preview 1. For more details on ASP.NET Core 1.1 please check out the announcement from last month. Thanks for watching.

Author

Maria Naggaga
Senior Program Manager

Maria Naggaga is a Program Manager on the Visual Studio .NET Team working on ASP.NET and .NET Interactive

0 comments

Discussion are closed.