Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure云服务的自定义端口号_Azure_Azure Web Roles - Fatal编程技术网

Azure云服务的自定义端口号

Azure云服务的自定义端口号,azure,azure-web-roles,Azure,Azure Web Roles,我有一个现有的Azure云服务,它提供http和https端点。到目前为止,一切都很顺利。最近,另一个小组要求我在一个特殊端口上添加一个SSL端点,以支持他们正在做的事情。因此,我在服务定义中添加了一个额外的端点并重新部署了它。下面是我的csdef: <?xml version="1.0" encoding="utf-8"?> <ServiceDefinition name="MyService" xmlns="http://schemas.microsoft.com/Serv

我有一个现有的Azure云服务,它提供http和https端点。到目前为止,一切都很顺利。最近,另一个小组要求我在一个特殊端口上添加一个SSL端点,以支持他们正在做的事情。因此,我在服务定义中添加了一个额外的端点并重新部署了它。下面是我的csdef:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-10.2.2">
<WebRole name="MyService.WebAPI" vmsize="Large">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="NonSSL Endpoint" />
          <Binding name="Endpoint2" endpointName="SSL Endpoint" />
          <Binding name="Endpoint3" endpointName="SSL 5200" />
        </Bindings>
      </Site>
    </Sites>
    <LocalResources>
      <LocalStorage name="localConfigStore" sizeInMB="1" />
    </LocalResources>
    <Endpoints>
      <InputEndpoint name="NonSSL Endpoint" protocol="http" port="80" />
      <InputEndpoint name="SSL Endpoint" protocol="https" port="443" certificate="mycert" />
      <InternalEndpoint name="InternalHttpIn" protocol="http" />
      <InputEndpoint name="SSL 5200" protocol="https" port="5200" certificate="mycert" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
    <ConfigurationSettings>
      <Setting name="LocalStorageAccount" />
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="mycert" storeLocation="LocalMachine" storeName="My" />
    </Certificates>
  </WebRole>
</ServiceDefinition>

如果我在Azure管理控制台中查看已部署的服务,我会看到所有三个端点,因此我不认为我在配置中犯了严重错误。。。我还需要做些什么才能把那个港口对外开放?或者Azure不允许使用非标准端口?

经过几次重新部署后,它突然开始工作。我猜在5200上发布并开始允许流量需要一段时间的防火墙更改。

如果从该端口删除SSL并转到http,会发生什么?你能卷曲到其他端点吗?是的,我能打到其他两个端点。我尝试将额外的端点切换到标准http,但它似乎有效,这不是我所期望的。。。
PS C:\Users\user> curl -k -v https://myservice.cloudapp.net:5200/api/health
* Hostname was NOT found in DNS cache
* Adding handle: conn: 0x4ae0a0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x4ae0a0) send_pipe: 1, recv_pipe: 0
*   Trying x.x.x.x...
* connect to x.x.x.x port 5200 failed: Connection refused
* Failed to connect to myservice.cloudapp.net port 5200: Connection refused
* Closing connection 0
curl: (7) Failed to connect to myservice.cloudapp.net port 5200: Connection refused
PS C:\Users\user>