简体   繁体   English

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

[英]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 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.我使用 .rdp 文件远程桌面访问我的虚拟机并在虚拟机上远程传输存档/编译代码。 I can access the ASP.NET web API default page on the remote desktop server at我可以在远程桌面服务器上访问 ASP.NET web API 默认页面在此处输入图像描述

What exactly should I do in Azure network security group to access my WebAPI from the Public Static IP of my VM?我究竟应该在 Azure 网络安全组中做什么才能从我的 VM 的公共 Static IP 访问我的 WebAPI?

You need to open port 8000 in the NSG.您需要在 NSG 中打开端口 8000。

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目标端口范围8000

  • Source port ranges : * (allows any source port) or your client public IP address源端口范围* (允许任何源端口)或您的客户端公共 IP 地址

  • Priority value : Enter a value that is less than 65,500 and higher in priority than the default catch-all deny inbound rule.优先级值:输入一个小于 65,500 且优先级高于默认全面拒绝入站规则的值。

For example,例如,

在此处输入图像描述

  1. Associate the network security group with the VM network interface or subnet.将网络安全组与 VM 网络接口或子网相关联。

Then you may restart your Azure VM to take this effect.然后您可以重新启动您的 Azure VM 以使其生效。 Get more details here . 在此处获取更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何访问Windows Azure VM(IIS Server)中部署的ASP.net网站 - How to access the ASP.net website deployed in Windows Azure VM (IIS Server) 如何在Windows Azure Web App上发布的asp.net网站中访问Web服务 - How to to access web service in asp.net web site whcih publish on windows azure Web App 从Windows Azure(ASP.NET MVC)进行的GMAIL API访问被拒绝访问 - Access is Denied on GMAIL API access from Windows Azure (ASP.NET MVC) 无法访问Windows Server 2016 Azure VM的Docker容器中托管的Asp.Net vNext应用程序 - Unable to access Asp.Net vNext application hosted in Docker Container in Windows Server 2016 Azure VM 我的新Windows Server 2019 iis上没有默认网站将ASP.NET Hello World发布到 - no default web site on my new Windows Server 2019 iis to publish an ASP.NET hello world to 验证ASP.NET Web API中的访问令牌 - Validating an access token in my ASP.NET Web API 在JAVA世界中是否有与ASP.NET WEB API相同的东西? - Is there an equivalent to ASP.NET WEB API in JAVA world? 在Rails世界中是否有与ASP.NET Web API相同的东西? - Is there an equivalent to ASP.NET Web API in the Rails world? Azure上的Asp.Net Core Web API - Asp.Net Core Web API on Azure 从ASP.NET MVC应用程序访问Web API路由 - Access Web API routing from ASP.NET MVC application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM