question

SalvadorMartinez-4166 avatar image
0 Votes"
SalvadorMartinez-4166 asked SaiKishor-MSFT commented

I have a problem when I consume a web service from my server

I am trying to consume a web service from my VM in azure, but when I send the request it does not response. I made other request with other service and it response ok, I suppose that the IP configured in the service is blocked, Could anyone help me please?

windows-serverazure-virtual-network
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SalvadorMartinez-4166 Thanks for reaching out to Microsoft Q&A. I understand that you are unable to connect to an external web service from your VM on Azure, is that right?

If so, here are a few things to check:

  1. Check the effective security rules on the NIC of your VM to verify if there is anything blocking the outbound traffic. [Here is how to do the same.][1]

  2. Please perform a Traceroute from the VM to this Web server to check where this traffic is being dropped and share the output for the same with me. Command- tracert webserverip

  3. Please access the webserver from a different device other than Azure VM and verify if you can access the same.

Thank you!
[1]: https://docs.microsoft.com/en-us/azure/virtual-network/diagnose-network-traffic-filter-problem#diagnose-using-azure-portal
[2]: https://www.winpcap.org/install/default.htm





0 Votes 0 ·

1 Answer

MotoX80 avatar image
0 Votes"
MotoX80 answered

Start with basic troubleshooting. RDP to the VM and from a Powershell prompt run Test-Netconnection and Invoke-WebRequest to the site name and see if you get any response back. If you get a 404 or unauthorized error, then you at least know that a firewall isn't blocking the port. Then run the same test from some other non-Azure machine and see if you get the same results.

 PS C:\> (Invoke-WebRequest https://www.yahoo.com).StatusCode
 200
 PS C:\> Test-NetConnection www.yahoo.com -port 443                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ComputerName     : www.yahoo.com                                                                                                                                                                                                                RemoteAddress    : 74.6.143.25                                                                                                                                                                                                                  RemotePort       : 443                                                                                                                                                                                                                          InterfaceAlias   : Wi-Fi
 SourceAddress    : 192.168.1.6
 TcpTestSucceeded : True

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.