Would a recent update to IIS change how Application_Start is executed in an ASP.NET web application?

Vincente Formica 0 Reputation points

We're seeing some systems fail where the Application_Start is not being executed. The only difference I'm seeing so far is in the OS and IIS versions. Windows 10 systems seem to work while Windows 11 and Server 2022 do not.

The weird detail here is that my "inetpub/wwwroot/webapp" folder does NOT contain a "global.asax" file, but still works (since this is a Web App I assume), but only on Windows 10. If I add that file to my Windows 11 VM then it starts to work.

What changed?

Internet Information Services
A set of technologies in the .NET Framework for building web applications and XML web services.
3,362 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vincente Formica 0 Reputation points

    The "non working" systems were missing the following files in the "bin" directory:

    We believe it was due to virus scans happening on the on-premise Devops server during the publish step of the pipeline. This can prevent the precompiled files from being generated, without any warning or errors.

    The solution we chose was to stop precompiling during publish. The website was using an output type of "Class Library" and was being used as a Web Application, so we believe the precompile settings were a leftover from before it was converted to a Web Application, and has been limping along (but working) for years, until now.

    0 comments No comments