{"id":1511,"date":"2013-01-24T17:50:46","date_gmt":"2013-01-24T17:50:46","guid":{"rendered":"http:\/\/galhano.com\/blog\/?p=1511"},"modified":"2013-01-24T17:53:52","modified_gmt":"2013-01-24T17:53:52","slug":"asp-net-application-serve-pages-only-over-https","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=1511","title":{"rendered":"ASP.NET application serve pages only over HTTPS?"},"content":{"rendered":"<p>To Serve all the pages over https add this to the Application_BeginRequest method in your Global.asax file.<\/p>\n<p>[vb]<br \/>\n Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)<br \/>\n   If Request.IsSecureConnection = False Then<br \/>\n     Dim ub As New UriBuilder(Request.Url)<br \/>\n     ub.Scheme = Uri.UriSchemeHttps<br \/>\n     ub.Port = 443<br \/>\n     Response.Redirect(ub.Uri.ToString, True)<br \/>\n   End If<br \/>\n End Sub<br \/>\n [\/vb]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To Serve all the pages over https add this to the Application_BeginRequest method in your Global.asax file. [vb] Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) If Request.IsSecureConnection = False Then Dim ub As New UriBuilder(Request.Url) ub.Scheme = Uri.UriSchemeHttps ub.Port = 443 Response.Redirect(ub.Uri.ToString, True) End If End Sub [\/vb]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[99,155],"tags":[207],"class_list":["post-1511","post","type-post","status-publish","format-standard","hentry","category-security","category-ssl","tag-ssl","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1511"}],"version-history":[{"count":5,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1511\/revisions"}],"predecessor-version":[{"id":1516,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1511\/revisions\/1516"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1511"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}