BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Releases Asp.Net Core 1.1 Preview 1

Microsoft Releases Asp.Net Core 1.1 Preview 1

This item in japanese

Microsoft recently released ASP.NET Core 1.1 preview. This version includes several new middleware components, WebListener server for Windows, Razor view compilation and Azure related features.

New middleware components and enhancements

This release brings the ability to use middleware component on a specific controller or action. The component can be used as an MVC resource filter using the new MiddlewareFilterAttribute. For example, response compression or caching could be configured to a specific action or controller instead of the whole application.

URL rewriting has been an IIS feature several versions as an http module. Url rewriting is back in A in this preview as a middleware component. The component can be configured to use IIS standard XML formatted rules, Apache Mod_Rewrite syntax or C# methods coded directly inside the web application.

ASP.NET Core 1.1 also brings two new middleware, response caching and response compression. Response caching middleware is the successor of OutputCacheAttribute of ASP.NET MVC.

Razor view compilation

In previous versions of ASP.NET MVC, there was a way to precompile a web site so that view compilation would incur at deploy time instead of runtime. Doing so eliminates the delay that would otherwise happen when loading a page for the first time after a deployment. ASP.NET Core 1.1 brings back the ability to precompile Razor views. The view compiler is added to an application in the “tools” section of project.json with a reference to tools package. After running a package restore, the command dotnet razor-precompile will precompile the razor views.

WebListener Server for Windows

WebListener is a server built on top of the Windows Http Server API. WebListener offers platform dependent features such as: Windows authentication, port sharing, HTTPS with SNI, HTTP/2 over TLS (Windows 10), direct file transmission and response caching WebSockets (Windows 8).

Azure related features

The AzureAppServicesIntegration package allows sending logs to Azure App Service. Any log messages that are written using the ILogger/ILoggerFactory abstractions will go to the locations configured in the Diagnostics Logs section of the App Service configuration in the Azure portal.

The AzureKeyVault package provides a configuration provider for Azure Key Vault. This allows you to retrieve configuration from Key Vault secrets on application start and hold it in memory, using the normal ASP.NET Core configuration abstractions to access the configuration data.

DataProtection was introduced in ASP.NET Core, providing cryptographic APIs. The preview brings two packages to allow storing Data Protection keys in Azure Storage and Redis. This allows keys to be shared across several instances of a website or across several servers in a load balancing scenario.

Rate this Article

Adoption
Style

BT