Azure 保留 IP 地址和没有端点的云服务

标签 azure azure-cloud-services

我有一个云服务,该服务从外部打开套接字并需要列入白名单的 IP 地址。没有任何东西会从外部发起与我的服务的连接。

当我尝试使用关联的预留IP 地址发布它时,出现以下错误:验证错误:根据 .csdef 文件验证 .cscfg 文件时出错。严重性:错误,消息:ReservedIP“xxxx”未映射到端点。服务定义必须至少包含一个映射到预留IP的端点..

.cscfg

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="Gateway" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="5" osVersion="*" schemaVersion="2015-04.2.6">
  <Role name="WorkerRole1">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="yyyyy" />
      <Setting name="APPINSIGHTS_INSTRUMENTATIONKEY" value="xxx" />
      <Setting name="ASPNETCORE_ENVIRONMENT" value="dev" />
    </ConfigurationSettings>
  </Role>
  <NetworkConfiguration>
    <AddressAssignments>
      <ReservedIPs>
       <ReservedIP name="xxxxx"/>
      </ReservedIPs>
    </AddressAssignments>
  </NetworkConfiguration>
</ServiceConfiguration>
  1. 有没有办法在不指定端点的情况下部署它? (我使用VS2017RC来部署)
  2. 如果不是,虚拟“端点”的 xml 会是什么样子?这样做会带来什么风险?
  3. 我应该有更好的方法来解决这个问题吗?

最佳答案

我遇到了同样的问题,我的工作解决方案是从 here 获取“输入端点”并将其放置在 WorkerRole 标记内的 .csdef 文件中。

<Endpoints>
  <InputEndpoint name="StandardWeb" protocol="http" port="80" localPort="80" />
</Endpoints> 

关于Azure 保留 IP 地址和没有端点的云服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41194682/

相关文章:

.net - 从头开始 Azure .NET 后端?

java - 如何在Java中获取FileInputStream中的azure blob存储内容?

sql-server - azure sql DB_ID 不起作用

azure - 如何获取 worker 角色中的Web角色输入端点?

azure-cloud-services - 确定 Azure 云服务的 guest 操作系统版本

删除实例后,Azure 云服务变得无响应?

azure - 通过ARM模板提供经典云服务

python - 将流数据从 Azure Blob 存储读取到 Databricks 中

使用依赖项注入(inject)的 Azure 函数 IConfig

azure - 如何使用流量管理器在云服务上配置 SSL?