I am trying a python webjob on my Azure App Service, but my zip file is not getting added and I receive a "Bad Request" error.

An1gupta 0 Reputation points
2024-10-25T07:35:52.31+00:00

I am trying a python webjob on my Azure App Service, but my zip file is not getting added and I receive a "Bad Request" error.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,891 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 310 Reputation points Microsoft Vendor
    2024-10-25T17:30:03.61+00:00

    Hi @An1gupta ,
    welcome to the Microsoft Q&A Platform!
    The "Bad Request" error while trying to upload a zip file for an Azure WebJob due to
    Verify Zip File Structure

    • Ensure the main Python script (e.g., run.py) is at the root level of the zip file.
    • Include necessary files like requirements.txt.

    Check Zip File Size

    • Ensure the zip file is within Azure's upload size limit.
    • For large dependencies, consider uploading only your code and installing dependencies separately.

    Verify WebJob and Web App Compatibility

    • Confirm Python is installed on your App Service.

    Ensure the WebJob runtime version is compatible with your code.

    Check Azure Portal Settings

    • Choose the correct WebJob type: “triggered” or “continuous”.
    • If using REST API or CLI, verify endpoint and payload format.
    • Go to Debug Console > site/wwwroot/App_Data/jobs and upload the zip file to see error messages.

    Check Logs for Errors

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.