Azure Windows VM based IIS Server fails to open new webpage of website - Frontended by Azure Application Gateway

Ravi Kumar Shanker 121 Reputation points
2021-12-29T12:24:59.847+00:00

161274-capture.jpgHello Team,

This is a very simple setup. All we have is

  • One app server (Azure Windows VM with IIS Role installed)
  • Managed SQL DB
  • One VNET with 3 subnets for VPN Gateway, Application Gateway and Private subnet for App Server (Windows VM)

The application server is front ended by application gateway (WAF, Medium Size Instance) with public IP address. This public IP address is registered to a domain registrar with custom DNS name.

User can access the application server by accessing the custom DNS name of application gateway via internet and everything works great!

However, when user clicks on any module within website's landing page, when it opens new tab it makes use of private IP address of the application server (windows VM) to open and it fails.

Locally to resolve this issue inside the application server itself, we created a IIS binding with custom DNS name but this did not resolve the issue while accessing via internet.

How to fix this issue? How to make sure the IIS server does not use the local IP address of server to open new webpage or is there a way we need to do any configuration with the application gateway to redirect local IP to DNS name etc.?

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,213 questions
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 50,021 Reputation points Microsoft Employee Moderator
    2022-01-05T06:47:27.367+00:00

    Hello @Ravi Kumar Shanker ,

    Below is the summary and resolution of the issue:

    You have an Azure application gateway setup with Azure Windows VM based IIS Server backend which fails to open new webpage of website. You were able to access the application server via the custom DNS name of application gateway and were able to login. However, when you click on any module within website's landing page, it opens a new tab and uses the private IP address of the application server (windows VM) to open and fails.

    We checked the network diagnostics when accessing the application gateway and found that the application is sending the private IP address in the host name of all the modules in it's response. You then changed the backend HTTP setting configuration of the application gateway to "Override with new host name" and added the custom domain in the settings as below:

    162370-image.png

    Post this change, the application gateway is able to access all the modules without any issues.

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer", as this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.