Radi Atanassov

SharePoint MCM, MVP, MCT and owner of OneBit Software

Running ASP.NET Framework web projects throw an ArgumentOutOfRange Exception on Windows 10 with the Fall Creators Update

Background

If you have a bunch of legacy ASP.NET web projects running on .NET Framework, not .NET Core, you might end up with this error:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: site]
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +298

[HttpException (0x80004005): Specified argument was out of the range of valid values.
Parameter name: site]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

The key hint on what the problem is, is Parameter name: site. You might get this out of nowhere if you install Windows 10's Fall Creator's Update. You can also get it in Windows 8. It all comes down to the IIS Express configuration and dependencies.

Here's a nice image for the record: