If you run into any trouble after adding a fresh Azure Webjob to your project and try to run it, my guess will be it has to do with connection strings and a missing storage account. If you don’t have an Azure Storage Account then creating one will be the first step. You then need to define these two connections strings in your web app: Portal (Web App -> Configure):
And the format for those connection strings:
1 DefaultEndpointsProtocol=https;AccountName=<span style="color: #ff0000;">STORAGE_ACCOUNT_NAME</span>;AccountKey=<span style="color: #ff0000;">PRIMARY_ACCESS_KEY</span>
Replace STORAGE_ACCOUNT_NAME with the name you give the storage account and get the PRIMARY_ACCESS_KEY from the Portal.
If you’re going to connect to a database, also make sure that the name of the connection string you’re using is present in the Portal as well. Otherwise, if you use something like ‘DefaultConnection’ (in your DB context) which is the default one, the Azure Web App will make sure to make that work, but WebJobs will not. When you look at the connection strings in the portal you will probably not find DefaultConnection, but something along the lines of “prod_db” etc. Either rename the connection string on both ends or make sure that ‘DefaultConnection’ is present so that WebJobs can access it.
Hopefully this little post can be of some help if you run into the same problems as I did.