Hello @Mukne, Himani ,
Thanks for posting your query on Microsoft QnA.
I understand you are trying to reach your application from within the VM but unable to.
You mentioned you are typing "http://<public IP>:4001" on the IE browser, and it works perfectly fine on local PC. Does that mean that the application works fine locally on the local machine which is on prem and not on Azure?
Or , does that mean you are able to access the application locally on the Azure VM itself? This would mean if you browse to "http://localhost:4001" or "http://<private-ip>:4001", your application will be served successfully.
If you are not able to access the application using the local host name or the private ip address, then please recheck if the application is listening on the expected 4001 port at the OS level using netstat -ano command.
You can use this port-check tool to see if the required port is reachable or not from outside your VM.
Let me know if this helps. Feel free to reach back by commenting under this post and tagging me.
-------------
Please don't forget to "Accept as Answer" and "Upvote" if you think my response was helpful, so that it can help others in the community looking for help on similar issues.