Fix for: "WebJob cannot be added from portal if deployment form source control is configured." Error?

Eric Giddings 1 Reputation point
2019-12-04T00:05:46.193+00:00

I use Git as a deployment method so I assume that is the source control deployment they are mentioning.

This is an error that only started coming up in the past few months as I have already created many WebJobs from the portal.

I have seen this StackOverflow (https://stackoverflow.com/questions/57972072/webjob-cannot-be-added-from-portal-if-deployment-form-source-control-is-configur) but does MS have a proper work around? Do they have a solution in the works?

It is a pain that the WebJob UI does not work for me any more.

Also, there is a spelling error in their error? Makes me wonder if there is much thought put into this error.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,920 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ryan Hill 25,981 Reputation points Microsoft Employee
    2019-12-04T20:13:48.04+00:00

    Hi @Eric Giddings

    This restriction was recently added by the product team due to an unexpected behavior when trying to configure WebJobs when Run From Package is enabled.

    Therefore, if you want to continue to deploy from the portal, you'll have to disconnect the portal deployment center, deploy to the portal, and re-enable. Otherwise, you can either deploy via Visual Studio, through kudu or an Azure DevOps CI/CD pipeline.

    1 person found this answer helpful.

  2. BTardif-[MSFT] 351 Reputation points
    2019-12-31T22:04:00.697+00:00

    If you have source control configured with your application, the webjobs should be deployed as part of the source control integration.

    Form App Service perspective a webjob is just part of the content of the app.

    If you deploy a webjob through the portal (before we added the restriction to block it) and then had a commit to your source control, then the webjob would be removed since it wasn't part of the payload being published by source control.

    The right way to do this is to make sure webjobs are part of your solution.

    As a workaround, you can deploy webjobs through FTP/FTPS but keep in mind they will be removed the moment source control does the next deployment.

    0 comments No comments