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
- Review WebJob logs in Log Stream on the Azure portal
Create a Python WebJob on Azure WebJob File Structure
If the answer is helpful, please click "Accept Answer" and kindly upvote it.