Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.04 KB

asp-net-httpruntime-appdomainapppath-throws-nullreferenceexception.md

File metadata and controls

42 lines (27 loc) · 1.04 KB

HttpRuntime.AppDomainAppPath Throws a NullReferenceException

Scope

Edge

Version Introduced

4.6.2

Version Reverted

4.7

Source Analyzer Status

NotPlanned

Change Description

In the .NET Framework 4.6.2, the runtime throws a T:System.NullReferenceException when retrieving a P:System.Web.HttpRuntime.AppDomainAppPath value that includes null characters.

In the .NET Framework 4.6.1 and earlier versions, the runtime throws an T:System.ArgumentNullException.

  • Quirked
  • Build-time break

Recommended Action

You can do either of the follow to respond to this change:

  • Handle the T:System.NullReferenceException if you application is running on the .NET Framework 4.6.2.

  • Upgrade to the .NET Framework 4.7, which restores the previous behavior and throws an T:System.ArgumentNullException.

Affected APIs

P:System.Web.HttpRuntime.AppDomainAppPath

Category

ASP.NET