Quantcast
Channel: Azure Management Portal forum
Viewing all articles
Browse latest Browse all 4189

Issues deploying a cloud service with two endpoints (HTTP and HTTPS)

$
0
0

I ran into an issue this week in the azure portal when I tried to deploy a cloud service with two endpoints.  (I am using the azure sdk 2.2).  I deployed the cloud service to production with the following endpoints in the ServiceDefinition.csdef:

<WebRole name="NameChanged.Web" vmsize="Small"><Sites><Site name="Web"><Bindings><Binding name="HttpsIn" endpointName="HttpsIn" /><Binding name="HttpIn" endpointName="HttpIn" /></Bindings></Site></Sites><Endpoints><InputEndpoint name="HttpIn" protocol="http" port="80" /><InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="NameChangedCertificate" /></Endpoints><Imports><Import moduleName="Diagnostics" /></Imports><Certificates><Certificate name="NameChangedCertificate" storeLocation="LocalMachine" storeName="My" /></Certificates></WebRole>
I followed the directions here (http://azure.microsoft.com/en-us/documentation/articles/cloud-services-configure-ssl-certificate/) in Step 3 for deploying the cloud service to the azure portal.  And HTTP worked just fine, but the HTTPS endpoint didn't work, we would get a 502 error whenever we tried to access the service via HTTPS.

We spent a lot of time to debug and see why HTTPS wasn't working, but everything we tried resulted in the same result:  502 error code when accessing the site via HTTPS.

The only way that we were able to get HTTPS working for the cloud service in azure, was to completely delete our instance in the azure portal, and then do a two step deployment:

Step 1 - Remove the HTTP endpoint from our ServiceDefinition.csdef, like so:

...<Site name="Web"><Bindings><Binding name="HttpsIn" </Bindings></Site></Sites><Endpoints><InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="staging" /></Endpoints>
    ...</WebRole>

We then deployed the service to the azure portal.  AND THE SERVICE WORKED WITH HTTPS!!!

Step 2 - We added the HTTP endpoint back into the ServiceDefinition.csdef, redeployed and both HTTP and HTTPS worked on the site.

I wanted to post this to help others that may have the same issue, and to see if anyone else has experienced this same thing?  Is this an issue in the azure 2.2 SDK?  This seems like a work around for getting both HTTP and HTTPS endpoints for a cloud service, and it seems "wrong".  Does anyone have a better way to do this?

Tim



Viewing all articles
Browse latest Browse all 4189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>