2012-01-28 61 views
0

我部署了Azure应用程序,并且想要为整个应用程序使用SSL。带有SSL的自定义子域不会重定向到Azure cloudapp

要做到安全我的应用程序:

-I made a subdomain in my site to point to the Azure application. 
-I got a SSL in the name of my subdomain 
-Add the certificate to the applicaton 
-Loaded the certificate to the Azure hosted account 
-Opened up a https endpoint in the application. 

现在,这是问题的出现。当我输入我的网址(使用子域名)时,无法找到该页面。但是,如果我手动在https://中输入url,它将会按照它的意图进入网站。

这是怎么回事?我只有一个https端点打开。我需要一个http端点吗?如果我这样做,我不能让用户使用没有加密的应用程序,那么我将如何解决?

谢谢你的帮助!

回答

1

我相信这不是一个特定的Azure问题。当输入URL:https://时,浏览器会自动采用http://协议并预先挂起它。由于您未打开http端点,因此连接时出现错误。

建议:打开http端点。连接到http端点后,将URL重定向/重写为https。如何做到这一点,取决于你用来开发你的网站的技术。(ASP.NET,MVC等)

+0

我正在开发MVC。如何将流量从http端点切换到https端点? – James 2012-01-28 22:23:51

+0

看看这个Stackoverflow的问题。 http://stackoverflow.com/questions/3072814/net-mvc-rewrite-urls-certain-urls-through-ssl你可能想要创建一个自定义的属性或使用标准RequireHttps并将其分配给任何你想要的控制器通过SSL重定向 – Igorek 2012-01-28 22:38:07