azure - 从 Internet 访问 Azure VM 中的 Suave 自托管应用程序

标签 azure f# self-hosting suave

我部署了一个 Suave 自托管 Web 应用程序,可从 Azure VM Windows Server 2012 R2 数据中心内的 http://localhost:9001 进行访问我正在尝试从虚拟机外部访问 http://[my-vm-name].cloudapp.net:9001

这是一个简单的 Hello world:

[<EntryPoint>] 
let main args = 
    startWebServer { defaultConfig with bindings = [ Types.HttpBinding.mk' Types.HTTP "127.0.0.1" 9001 ] } (OK "Hello world")
    0

localhost accessible

我已经有了:

  1. 在虚拟机防火墙上设置端口 9001 的入站和出站规则 enter image description here enter image description here
  2. 在 Azure 门户上添加了 9001 TCP 和 UDP 端点

azure portal endpoints

我发现的所有解决方案/教程都没有指定比我已经做的更多的细节,但我仍然无法从虚拟机外部访问我的网络应用程序。我还缺少什么?

最佳答案

您没有指定使用什么技术来构建应用程序,但在许多情况下,有一些选项可以指定要绑定(bind)到哪些地址。确保您实际上绑定(bind)到所有地址/接口(interface),而不仅仅是本地主机。

关于azure - 从 Internet 访问 Azure VM 中的 Suave 自托管应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33978138/

相关文章:

hosting - Streamlit 托管

asp.net-mvc - 使用 asp.net 属性路由的根路径的默认路由

azure - 40400 未找到端点 - 来自 Azure 服务总线的错误(应用程序功能)

python - 如何在 Azure Web 应用程序上 pip 安装 bcrypt?

c# - 在 C# 和 F# 之间交换大列表

f# - 将 F# 列表设置为 null 以进行序列化

f# - 类型定义中的“可变”

iis - 自托管 Web 应用程序与 IIS 托管?

php - Azure SAS 容器 PHP

python - Azure Databricks 集群初始化脚本 - 安装 python 轮