Wednesday, August 29, 2018

WebJobs Seemingly Running the Wrong Code

We ran across a strange issue today. A colleague and I both deployed the same commit for a WebJob to Azure. One of our deployments worked as expected and mirrored what we saw on our local machines. Our other deployment threw an exception.

Strangely enough, the exception referenced a line number that didn't exist in the current commit.

A week prior, we had changed the name of the WebJob on the server.

By logging into the Azure Web App's SCM site and browsing files in the /site/wwwroot/app_data/jobs/continuous/[webjob name], we saw TWO sets of DLLs - one set using the old names, and one set using the new names.

Bottom line: if you find your WebJob behaving strangely and you've renamed your project or WebJob recently, log into your SCM site and ensure that the code you expect to be deployed is actually present and that there are no extraneous files.