Why am I getting a 403 error on my Azure website?

AppleBananaCarrot 0 Reputation points
2024-08-16T17:59:46.97+00:00

quiz___

I have a website that works fine when I test it on my home computer.

I'm trying to upload it to a shared Azure account where a previous version of the website (which uses Node and React, and with no database right now) was hosted (and worked).

I uploaded the backend which seemed to work and the front end which didn't. I changed the version of node in the Azure settings and reuploaded from the front end (which now didn't yield any errors) and back end.

When I uploaded it I got a 403 error for a couple of hours. But now I get

":( Application Error

If you are the application administrator, you can access the diagnostic resources."

When I click on diagnostic resources I see the following.

I'm a bit of a noob and the original programmer is unavailable for a while.

I just want to do some gentle testing of the website, with low traffic.

What is the problem? Is this just something that free mode doesn't support? If so, why? And how would I get an idea of how much an upgraded version would cost?

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

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,506 Reputation points Microsoft Employee
    2024-08-18T00:23:27.5166667+00:00

    @AppleBananaCarrot It sounds like you’re encountering a few different issues with your Azure website. Let’s break down the potential causes and solutions for each error:

    403 Error

    A 403 error typically indicates that access to the resource is forbidden. Here are some common reasons and solutions:

    1. IP Restrictions: Ensure that there are no IP restrictions set on your Azure App Service that might be blocking access. (not likely in your scenario)
    2. Permissions: Check the permissions for the files and directories in your web app. Ensure that the necessary permissions are set correctly. (likely since you have not been able to get the site online yet)
    3. Billing or Quota Limits: Verify that your Azure subscription is active and that you haven’t reached any usage quotas. (Higher probability since you are using a free tier web app.)

    503 and 504 Errors

    These errors usually indicate issues with the server or the app container:

    1. App Container Failed to Start: This could be due to several reasons, such as incorrect configurations or missing dependencies. Check the logs in the Azure portal for more detailed error messages. (we see in your screenshot that your container is not starting. Ensuring a successful start of the container is the first place I would start. Go to the Azure portal, navigate to your App Service, and select Container settings. Click on Logs to view the container logs.)
    2. Resource Limits: Ensure that your app service plan has enough resources (CPU, memory) to handle the application.

    Application Error

    The generic application error message suggests that there might be an issue with the deployment or configuration:

    1. Node Version: Ensure that the Node.js version specified in your Azure settings matches the version required by your application.
    2. Environment Variables: Verify that all necessary environment variables are set correctly in the Azure portal.
    3. Logs and Diagnostics: Use the diagnostic resources in the Azure portal to check the detailed logs and identify the root cause of the issue.

    Steps to Troubleshoot

    1. Check Logs: Go to the Azure portal, navigate to your App Service, and check the logs for any specific error messages.
    2. Review Configuration: Double-check your app settings, including the Node.js version, environment variables, and any IP restrictions.
    3. Restart App Service: Sometimes, simply restarting the App Service can resolve transient issues.

    If you are still having issues, please share with us what you find in your logs so that we can assist you further.

    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.