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

Vincente Formica 0 Reputation points
2023-10-25T14:14:19.3533333+00:00

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
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,417 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vincente Formica 0 Reputation points
    2023-10-26T17:36:06.8666667+00:00

    The "non working" systems were missing the following files in the "bin" directory:
    "App_global.asax.compiled"
    "App_global.asax.dll"

    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.
    http://ydie22.blogspot.com/2008/11/aspnetcompiler-and-missing-compiled.html

    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