Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I am afraid I am not sure what the requirement here is.
Note 1:
- You added Host Binding to your IIS VM.
- This means, requests to IIS VM would expect the host to be "Test"
- And other host or directly accessing via IP Address would give you 404 (not Traffic Manager, the IIS VM itself would give you 404)
Note 2:
- Custom header settings is only for endpoint monitoring, i.e., Health check ups from Azure Traffic Manager to your IIS VM.
- Not for actual customer traffic to your IIS VM. See : ATM Endpoint monitoring
- This means, the header Host:Test is only sent when ATM probes for health of the IIS VM, not when a customer tries to access the IIS VM.
- Also, customer traffic never passes through a ATM. This means, there is no way you can influence the HTTP Headers of a client request using ATM.
- See : How clients connect using Traffic Manager.
-
So, when a custom requests goes to the VM, it will not have the header Host:Test and hence, the IIS VM would return a 404.
P.S :
- The reason it is working with PostMan is that you are manually sending the header Host:Test with your request (per your screenshot)
-
- If you were to remove the Host header, this will also give 404 only (just like a Browser, because when you access the site via Browser, the Host header is not added by anyone)
-
Kindly let us know if this helps or you need further assistance on this issue.
Thanks,
Kapil