The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Leo Monroy 1 Reputation point
2021-10-13T04:48:47.923+00:00

I deployed my react app to Azure windows and the home page renders correctly but any other pages generates the error seen in the title of this post.

From what I understand this error is caused because I don't have a web.config file in the wwwroot directory which is need by the windows IIS server. The problem is that I can't upload the web.config file into the wwwroot directory using kudu. How else can I uploaded it?

One more question when I do a build with VS it does not create a web.config file?

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

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,376 Reputation points
    2021-10-14T05:32:55.347+00:00

    Thanks for asking question! This error suggests that the file you are looking is not present on the server or web.config file is not configured properly. Visual Studio automatically generates a web.config for you when you target deployment for your website's build. You can get an idea about web.config files in general here. Its present in the wwwroot directory of your web application once it's deployed.

    Also, As you mentioned

    I can't upload the web.config file into the wwwroot directory using kudu.

    If any specific error you are receiving here? Could you please try to start VS with Administrator privileges?
    Do you have Contributor / Owner role. Azure has an authorization system called role-based access control (RBAC) with several built-in roles you can choose from. You can assign these roles at different scopes, such as management group, subscription, or resource group.

    You may refer to below links:

    Other than Kudu Debug console you can use App Service Editor from Azure Portal, that provides an in-browser editing experience for our App code.

    See: https://social.technet.microsoft.com/wiki/contents/articles/36467.understanding-the-azure-app-service-editor.aspx

    Also, suggest you check Azure App Services Diagnostic Logs to isolate this issue there are sub-status codes listed in the diagnostic logs for your web app. Check out the web server logs for this detail:

    Check: https://learn.microsoft.com/en-us/azure/app-service/web-sites-enable-diagnostic-log

    Let us know if issue remains.

    1 person found this answer helpful.