我有一个云服务,它从外部打开套接字并需要列入白名单的 IP 地址。没有任何东西会从外部发起与我的服务的连接。
当我尝试使用关联的 ReserveIP 地址发布它时,出现以下错误: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 会是什么样子,这样做会带来什么风险?
- 我应该有更好的方法来解决这个问题吗?
我遇到了同样的问题,我的工作解决方案是从here https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-enable-communication-role-instances并将其放置在 WorkerRole 标记内的 .csdef 文件中。
<Endpoints>
<InputEndpoint name="StandardWeb" protocol="http" port="80" localPort="80" />
</Endpoints>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)