Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App_Global.asax.compiled and App_Global.asax.dll missing? WebApi .NET 4.5 project

During our adventures of building a 'simple' API using WebAPI we've had our fair share of issues as any project does, however I am unable to find any such resource that can explain the following behavior:

Details :
  • Visual Studio 2013 with Update 2 (however, before updating, this was the same)
  • Windows Server 2008 R2
  • Web API 5.1.2

  • The issue seems to be related to the "Publish" command, specifically the "Precompile" option.

      When running via IIS Express, we see no issues at all.

    If we publish once, it fails to include the App_Global.asax.compiled & App_Global.asax.dll in the bin directory. If it is updating an existing instance of the application, it will actually delete the existing two files.

    Note: This Happens regardless of WebPublish or FileSystem Publish

      This behavior is causing 404.0 Errors upon loading to IIS, instead of our expected 201.

    However, if I publish a second time no changes to the previous profile/configuration, it adds the two back.

      For a while, we thought it was permissions issues, and weren't seeing consistent behavior. This happens on all of our development machines with the same behavior.
      We've seen posts regarding mysterious behavior, but from our analysis, this is the root of the problem.
    like image 286
    Brett Salmiery Avatar asked May 22 '14 17:05

    Brett Salmiery


    1 Answers

    Just wanted to let everyone know that my problem was solved.

    This was an issue with a virus scanner scanning the newly created temp directory for precompiling and actually locking the files in question.

    So if anyone has issues such as this and is running any antivirus (especially enterprise level):



    TLDR:

    • Check if your antivirus is locking files.
    • Turn off all compsec scanning utilities and turn on one by one to isolate which is causing problems.
    like image 93
    Brett Salmiery Avatar answered Sep 17 '22 06:09

    Brett Salmiery