We released Visual Studio 2015 RC which included ASP.NET 5 Preview. Along with ASP.NET 5 Preview we have also been working on improving ASP.NET 4.6 which includes Web Forms, MVC 5 and Web API 2. This post highlights updates in this area.
What is ASP.NET 4.6?
ASP.NET 4.6 is an umbrella term used to describe updates existing Frameworks such as ASP.NET Web Forms/ MVC 5/ Web API 2 etc. You can build Web Apps using these Frameworks on the standard, desktop-enabled .NET Framework model.
Improvements in ASP.NET 4.6 for Web Forms/ MVC 5/ Web API 2.
Apart from working on ASP.NET 5, we are also working on updating Frameworks in ASP.NET 4.6. You can expect changes around supporting platform updates. These includes updates in .NET for .NET Compiler Platform (Roslyn) and hosting changes in IIS to support HTTP/2. The following lists the updates for ASP.NET 4.6
Authentication Updates
The ASP.NET 4.6 templates now use Open Id Connect middleware to authenticate with Azure AD. This makes the programming model to authenticate with Azure AD much easier.
There is a New Connected Services Tool which allows you to Configure AD Authentication on existing projects. For more details read this post.
If you select the “Individual User Accounts” option, then the ASP.NET 4.6 templates show how to use two-factor authentication and social logins. The template uses the latest version of ASP.NET Identity.
Updates to MVC 5.2.3/ Web API 5.2.3
The latest version of the MVC, Web API and Web Pages have lots of fixes around improving performance. Read this post for more details.
Enabling the .NET Compiler Platform (“Roslyn”) in ASP.NET applications
You can use the new language features of C# and VB in any ASP.NET 4.6 project. The Web Forms templates in VS 2015 have the Microsoft.CodeDom.Providers.DotNetCompilerPlatform package pre-installed. Read this post for more details on the providers.
The following screen shows how you can use string interpolation from C# 6 in your Web Forms pages.
In this Preview, following are some known issues which will be resolved for RTM.
- The providers will be added to all templates such as MVC 5/ Web API 2 etc. You can download this NuGet package to use the new languages features in your views.
- When you open Web Forms pages, you will see errors in the “Error List” windows as shown above. However, this does not prevent the project from running successfully.
Async Model Binding for Web Forms
In .NET Framework 4.5, Model Binding support was added to Web Forms. In .NET Framework 4.6, we are adding support for Async Model Binding which allow you write Asynchronous Model Binding actions. The following code snippet shows a Web Forms page using Async Model Binding actions.
Add support for HTTP/2
In Windows 10 and .NET Framework 4.6, we have added support for HTTP/2. The main goal for HTTP/2 is to improve performance, latency, and network usage by using a single connection from browsers to a Web site. See this video to learn more.
Updated Ajax Control Toolkit
The Ajax Control Toolkit is a very popular toolkit used by many Web Forms developers. The Toolkit has many fixes to improve quality and new features such as modern templates, Web Optimization support and more.
The Toolkit is still free and open sourced and is being maintained by Dev Express. Read http://devexpress.com/ms-act for more details.
Updated Frameworks and controls to support EF 6
We have updated Dynamic Data Framework, Entity Data Source Control and Universal Providers so they work with Entity Framework 6. Read this post for more details.
Entity Framework 6.1.3
Entity Framework 6.1.3 has bug fixes and performance improvements over 6.1. Read this post for more details.
ASP.NET Identity 2.2.1
ASP.NET Identity 2.2.1 has many bug fixes and performance improvements over 2.1. Read this post for more details.
.NET Improvements
Read this post from the .NET team about improvement to .NET Framework 4.6 and .NET Languages - C#, VB
Updated C# & VB templates with latest packages
The ASP.NET 4.6 templates carry the latest packages for MVC, Web API, Entity Framework, Identity etc.
Support for Azure API Apps
You can build Azure API apps. As part of the Azure SDK 2.5.1 release, a new feature called Azure API Apps were included. This new feature raises the capabilities of ASP.NET Web API 2, extending it with Swagger metadata while providing a simple to manage interface in the Azure Portal. Extend your API with authentication and no code changes, or generate an SDK for your API with a few clicks. A full definition of API Apps and their capabilities is available in the online Azure documentation.
Summary
As we work on ASP.NET 5, we encourage you to look at the updates happening in ASP.NET 4.6 and .NET.