title: Deploying React application on azure
body: <p>I am trying to deploy my react application on Azure. This is a create-react-app which I have ejected. I have followed this article to deploy it. I have added my build file and web.config to my site/wwwroot in azure. When I to my webapp url I get the page saying <strong>"You do not have permission to view this directory or page."</strong> </p>
  
  <p>I am using client side routing (react-router) in my application. </p>
  
  <p>These are my files</p>
  
  <p>web.config</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;rewrite&gt;
              &lt;rules&gt;
                  &lt;rule name="React Routes" stopProcessing="true"&gt;
                      &lt;match url=".*" /&gt;
                      &lt;conditions logicalGrouping="MatchAll"&gt;
                          &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                          &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                          &lt;add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /&gt;
                      &lt;/conditions&gt;
                      &lt;action type="Rewrite" url="/" /&gt;
                  &lt;/rule&gt;
              &lt;/rules&gt;
          &lt;/rewrite&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>And this is how my project looks on azure</p>
  
  <p><a href="https://i.stack.imgur.com/VNIE7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VNIE7.jpg" alt="enter image description here"></a></p>