Issue: "You do not have permission to view this directory or page" on Azure App Service (Windows) with Code Push Server

gowtham@AIT 20 Reputation points
2025-02-26T08:02:57.7466667+00:00

Hello,

I need to create a code-push-server using Azure App Service with windows OS

Created a azure app service with windows OS with Node 18LTS

configured environment variables

AZURE_STORAGE_ACCOUNT

AZURE_STORAGE_ACCESS_KEY

AZURE_STORAGE_CONNECTION_STRING

Configured Settings for

SCM Basic Auth Publish on

FTP Basic Auth Publish on

Navigated to Deployment Center in Deployment

In Deployment Center Navigate to FTPS

Used the FTPS credentials to Deploy the code-push-server codebase in app service using FTPS(Winscp)

using winscp move the files one by one
code-push-sever files https://github.com/microsoft/code-push-server/tree/main/api

Then logged into server by using kudu console

Navigate to the Application Path

$ cd /site/wwwroot/

And then add web.config

web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="iisnode" path="bin/script/server.js" verb="*" modules="iisnode" />
    </handlers>
    
    <rewrite>
      <rules>
        <!-- Redirect all requests to bin/script/server.js -->
        <rule name="DynamicContent">
          <match url=".*" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="bin/script/server.js" />
        </rule>
      </rules>
    </rewrite>

    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="4294967295" /> <!-- Allows large uploads -->
      </requestFiltering>
    </security>

    <iisnode loggingEnabled="true" />
  </system.webServer>
</configuration>

And executed the commands

$ npm install

$ npm run build

after runned the command navigated to azure portal and checked the url

the website url shows You do not have permission to view this directory or page.

User's image

then moved to logifiles and there moved into it and analized the log I have this

User's image

Kindly let me know if there are any additional suggestions or improvements.

Regards,
Gowtham N

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

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.