Hi PM Pro Consulting LLC and thx for join us at Q&A,
Ravi Varma Mudduluru such a good question but I'll try to answer without that details,
If u are getting too long to respond that usually means the browser cant establish a connection at all not that the app is returning an error. Lets see if the VM is actually listening on the expected port from inside the VM, use netstat or curl localhost and make sure the service is running, then check the Network Security Group on both the NIC and the subnet and confirm there is an inbound rule allowing the exact port from the correct source. Is verify the Windows firewall or Linux firewall inside the VM is not blocking it. If u are using Azure Firewall or a load balancer, pls be sure the public IP is correctly associated and the rule is forwarding traffic to the right private IP and port.
Another common issue is the VM public IP changed if it was dynamic, so double check u are hitting the correct address, if ping works but the port doesnt it is almost always an NSG or OS firewall issue. If ping not work either see VM is running and not stopped or deallocated. Hope that would help to find out the root of issue
rgds,
Alex