简体   繁体   中英

How to access my ASP.NET Web API on Windows Azure VM from the outside world?

I have a ASP.NET web API running on an Azure Windows VM. I use.rdp file remote desktop to access my VM and transfer archive/Compile code remotely on the VM. I can access the ASP.NET web API default page on the remote desktop server at在此处输入图像描述

What exactly should I do in Azure network security group to access my WebAPI from the Public Static IP of my VM?

You need to open port 8000 in the NSG.

The steps you can follow:

  1. Create a network security group if you don't have one.
  2. Create an inbound security rule allowing traffic and assign values to the following settings:
  • Destination port ranges : 8000

  • Source port ranges : * (allows any source port) or your client public IP address

  • Priority value : Enter a value that is less than 65,500 and higher in priority than the default catch-all deny inbound rule.

For example,

在此处输入图像描述

  1. Associate the network security group with the VM network interface or subnet.

Then you may restart your Azure VM to take this effect. Get more details here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM