An error occurred while creating the WebJob schedule

后端 未结 10 704
一整个雨季
一整个雨季 2020-12-14 15:18

I an trying to publish my website along with few WebJobs but after the website and the jobs are created on the Azure Website, I see an error on the VS.NET 2013 that says:

相关标签:
10条回答
  • 2020-12-14 15:44

    If you get this error when publishing from PowerShell, it probably means you are not logged into to your azure subscription or logged into the wrong subscription. If the browser is not prompting for your credentials, it's probably using the wrong subscription. If does not ask for login, clear the cookies and try again.

    0 讨论(0)
  • 2020-12-14 15:45

    Updating the nuget package to the latest update, in my case 1.10.12, did the trick.

    HOWEVER visual studio did not manage to remove the previous package. To do this I had to restart windows, and then before opening up visual studio, deleting the folder containing the old version of webjobs.publish.

    This did the trick for me!

    0 讨论(0)
  • 2020-12-14 15:49

    I managed to rid this error by removing an old reference in my web csproj file

    <Import Project="..\packages\Microsoft.Web.WebJobs.Publish.1.0.7\tools\webjobs.targets" Condition="Exists('..\packages\Microsoft.Web.WebJobs.Publish.1.0.7\tools\webjobs.targets')" />
    

    I had already upgraded to the newer package Microsoft.Web.WebJobs.Publish.2.0.0 which was also referenced.

    0 讨论(0)
  • 2020-12-14 15:56

    I had this problem when trying to publish my webjob to a deployment slot.

    The webjob got published, but the website was not found when trying to hook up the schedule.

    I was able to go around this by doing 1 manual publish through the portal, and setting the schedule there. After that i could just publish from VS, and the schedule would remain untouched.

    0 讨论(0)
  • 2020-12-14 15:56

    I ran into this again in VS2017, and the root cause was the deprecation of the VS Azure Scheduler integration feature. Per David Ebbo's recommendation in the linked thread, I converted my webjobs to use the CRON scheduling feature and publish now works as expected. Note that the Always On setting must be enabled on the app.

    Some more debugging options if you're encountering this:

    • Make sure the correct publish profile (pubxml) file is being used. I had several publish profiles files for the same webjob and tried publishing with the wrong one by mistake.

    • I suggest trying first to publish the webjobs separately, one by one (rather than publish them all alongside the website).

    • If you can't get a webjob to publish, delete its Properties\PublishProfiles folder and try to publish again - you'll be greeted with a VS wizard that should get you sorted (it will recreate the pubxml files correctly).

    0 讨论(0)
  • 2020-12-14 16:01

    For me this happened when I switched from deploying to one Azure account to another account. In Visual Studio, open/expand the Server Explorer side-window, right click on Azure, select "Connect to Microsoft Azure Subscription...". You'll be asked to logout and login with new credentials.

    0 讨论(0)
提交回复
热议问题