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

Salvador Martinez 1 Reputation point
2021-10-27T05:20:12.62+00:00

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?

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,142 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 31,571 Reputation points
    2021-10-27T21:48:53.25+00:00

    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
    
    0 comments No comments