0
votes

We have a Web App hosted in Azure. We have a staging deployment slot that the web app is on and the URL provided is a .internal link that is not accessible. How do we create an accessible URL for the deployment slot. Thank you!

1

1 Answers

1
votes

The staging site deployed would have a separate URL on the slot's resource page. The deployment slot has its own host name and is also a live app. Which is publicly accessible by default, however, we have ways to limit public access to the deployment slot, for this checkout 'Azure App Service IP restrictions' – For it to work, IPv4 address ranges that start with 10. and 100. are internal to your deployment. You should allow them to connect to your app.

You have stated that the staging site is inaccessible, please do share more details on the error you may be receiving and how exactly are you accessing the site.

Some common issues and ways to mitigate:

During custom warm-up, the HTTP requests are made internally (without going through the external URL). They can fail with certain URL rewrite rules in Web.config. For example, rules for redirecting domain names or enforcing HTTPS can prevent warm-up requests from reaching the app code. To work around this issue, modify your rewrite rules by adding the following two conditions:

 <conditions>
 <add input="{WARMUP_REQUEST}" pattern="1" negate="true" />
 <add input="{REMOTE_ADDR}" pattern="^100?\." negate="true" />
 ...
</conditions>

Without a custom warm-up, the URL rewrite rules can still block HTTP requests. To work around this issue, modify your rewrite rules by adding the following condition:

<conditions>
<add input="{REMOTE_ADDR}" pattern="^100?\." negate="true" />
...
</conditions>

Checkout the doc setting up App Service staging environment for more details on this topic.