Hi @Rajoli Hari Krishna
It seems that you are experiencing issues with deploying your frontend React application to a virtual application within an Azure App Service.
Ensure that your frontend files are correctly placed in the site/webui
directory after deployment. You can verify this using the Kudu console.
Ensure that a web.config
file is present in your frontend deployment. This file is crucial for routing and handling requests correctly in Azure App Services. If it's missing, you may need to create one that specifies how to handle incoming requests.
If your React app uses client-side routing (like React Router), you will need to configure the web.config
file to redirect all requests to the index.html
file. Here’s an example of what the web.config
might look like:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/webui/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Since you are using the zip deploy method, ensure that the zip file contains all necessary files, including the web.config
file and the built frontend assets.
When accessing your site, make sure you are using the correct URL structure. If your app is hosted at https://webapp-stick-dev-uks-01.azurewebsites.net/webui/
, ensure that your React app is configured to handle requests at that path.
If you follow these steps and ensure that your configuration is correct, it should help resolve the issues you are facing with your frontend deployment.
https://learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal#configure-default-documents
Deploy your web app to Azure Static Web Apps (react)
you may the similar thread for references.
https://learn.microsoft.com/en-us/answers/questions/869603/react-web-application-you-do-not-have-permission-t
Let us know for further assistances needed.