.NET Framework 4.7.1 ASP.NET and Configuration features

Preeti Krishna

September 13th, 2017

This post describes the new ASP.NET, Configuration and System.Messaging features and improvements in the .NET Framework 4.7.1. More information on the build these features are available in and how to get the Developer Pack is covered in the Welcome to the .NET Framework 4.7.1 Early Access blog post.

Configuration builders

Configuration builders allow developers to inject and build configuration for applications at runtime, allowing configuration data to be pulled from sources beyond the traditional .config file. In previous versions of the .NET Framework, configuration has been static. Applications only draw configuration data from a limited chain of .config files. With Configuration Builders, applications can apply a custom-defined set of builders to any section of config. These builders are free to modify the configuration data contained in the given config section, or build it entirely from scratch – possibly drawing new data from new sources that are not static files. To use the Configuration Builders feature, developers simply need to declare builders in config, then apply them to configuration sections with the ConfigBuilders tag. To implement custom Configuration Builder, developers can inherit from the System.Configuration.ConfigurationBuilder base class.

Here are some code samples that will enable you to declare, use and apply configuration builders.

ASP.NET Execution Step Feature

ExecutionStepInvoker feature, developers will be able to run this execution step inside their code. ASP.NET processes requests in its predefined pipeline which includes 23 events . ASP.NET executes each event handler as an execution step. With this newfeature, developers will be able to run this execution step inside their code.

Today ASP.NET can’t flow the execution context due to switching between native threads and managed threads. ASP.NET selectively flows only the HttpContext which may not be sufficient for ambient context scenarios. With this feature we enable modules to restore ambient data. The ExecutionStepInvoker is intended for libraries that care about the execution flow of the application (tracing, profiling, diagnostics, transactions, etc.).

We have added a new API to enable this: HttpApplication.OnExecuteStep(Action<HttpContextBase, Action> callback)

Check the following sample to leverage this new feature.