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:
- https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal?tabs=current
- https://learn.microsoft.com/en-us/azure/billing/billing-add-change-azure-subscription-administrator#assign-a-user-as-an-administrator-of-a-subscription
- https://github.com/projectkudu/kudu/wiki/Accessing-the-kudu-service
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.
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.