You do not see async transactions for WebApi, HttpClient, SqlCommand, SqlDataReader, NpgsqlCommand, or custom instrumentation. This problem typically occurs for apps created with New Relic's .NET agent under .NET Framework 4.0 or earlier, then migrated to .NET Framework 4.5 or higher.
system.web setting is required if you are using:
- WebApi1 or WebApi2
- Async methods in HttpClient, SqlCommand, SqlDataReader, or NpgsqlCommand
- Async-related custom transactions or custom instrumentation
- New Relic .NET agent version 126.96.36.199 or higher
- .NET Framework 4.5 or higher as the target for your app
If these conditions apply, then you must ensure your app uses the upgraded request processing pipeline introduced in .NET 4.5.
To use the upgraded pipeline, ensure your
web.config includes one of the following settings. If neither setting appears, add one:
Optional: You can tell the .NET framework to perform additional checks of your async code at runtime. These checks catch common issues in async code, which may be masked by the legacy ASP pipeline.
If your app passes without any issues, you can be confident that your app correctly handles the new pipeline. For more information, see Microsoft's configuration documentation.
To enforce additional checks, add the following to
<configuration><appSettings><add key="aspnet:AllowAsyncDuringSyncStages" value="false" /></appSettings><configuration>
Async instrumentation is disabled if the legacy integrated pipeline is present. Before .NET 4.5, the integrated pipeline could cause deadlocks. For more information about this .NET Framework bug, see: