没有端点的 Azure ReservedIPAddress 和云服务
Azure ReservedIPAddress & Cloud Service without an endpoint
我有一个云服务,它在外部打开一个套接字,需要一个列入白名单的 IP 地址。没有任何东西会从外部启动与我的服务的连接。
当我尝试使用关联的保留 IP 地址发布它时,出现以下错误:Validation Errors: Error validating the .cscfg file against the .csdef file. Severity:Error, message:ReservedIP 'xxxx' was not mapped to an endpoint. The service definition must contain atleast one endpoint that maps to the ReservedIP..
.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>
- 有没有办法在不指定端点的情况下部署它? (我使用的是VS2017RC部署)
- 如果不是,xml 对假人来说会是什么样子 'endpoint' 我 运行 这样做有什么风险?
- 有没有更好的方法来解决这个问题?
似乎只有包含外部端点的服务才支持 ReservedIP。您可以做的是添加一个外部端点,但使用 NSG (Network Security Group) 将其防火墙关闭。
有关定义端点的帮助,请参阅
另外,如果你使用的是本机实际未绑定的端口,应该不是漏洞;但在 NSG 中添加拒绝规则也将涵盖未来的任何更改。
[旁白] 如果您的服务没有任何传入连接,您应该考虑使用工作者角色而不是网络角色。长 运行 线程可以在 Web 角色实例中终止。
我 运行 遇到了同样的问题,我的工作解决方案是从 here 中获取 "Input endpoint" 并将其放在 WorkerRole 标记内的 .csdef 文件中。
<Endpoints>
<InputEndpoint name="StandardWeb" protocol="http" port="80" localPort="80" />
</Endpoints>
我有一个云服务,它在外部打开一个套接字,需要一个列入白名单的 IP 地址。没有任何东西会从外部启动与我的服务的连接。
当我尝试使用关联的保留 IP 地址发布它时,出现以下错误:Validation Errors: Error validating the .cscfg file against the .csdef file. Severity:Error, message:ReservedIP 'xxxx' was not mapped to an endpoint. The service definition must contain atleast one endpoint that maps to the ReservedIP..
.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>
- 有没有办法在不指定端点的情况下部署它? (我使用的是VS2017RC部署)
- 如果不是,xml 对假人来说会是什么样子 'endpoint' 我 运行 这样做有什么风险?
- 有没有更好的方法来解决这个问题?
似乎只有包含外部端点的服务才支持 ReservedIP。您可以做的是添加一个外部端点,但使用 NSG (Network Security Group) 将其防火墙关闭。
有关定义端点的帮助,请参阅
另外,如果你使用的是本机实际未绑定的端口,应该不是漏洞;但在 NSG 中添加拒绝规则也将涵盖未来的任何更改。
[旁白] 如果您的服务没有任何传入连接,您应该考虑使用工作者角色而不是网络角色。长 运行 线程可以在 Web 角色实例中终止。
我 运行 遇到了同样的问题,我的工作解决方案是从 here 中获取 "Input endpoint" 并将其放在 WorkerRole 标记内的 .csdef 文件中。
<Endpoints>
<InputEndpoint name="StandardWeb" protocol="http" port="80" localPort="80" />
</Endpoints>