Ask a Question related to ASP, Design and Development.
-
Kenneth Keeley #1
Switching Between HTTP and HTTPS
Hi
I wish to have a web site that has most of the pages as normal HTTP pages
but has some areas that use HTTPS. I want to have it that if a user selects
a link to a HTTPS page that they go there an there Session Information is
kept. I also wish to have the pages switch automatically to HTTPS if a
visitor types the URL without the HTTPS. So my questions are:
1) How to redirect to a Secure Page without losing Session Info?
2) How to test if page is accessed by HTTPS, and if not switch to HTTPS
quickly?
I think something like this code is what I want but how do I do it.
<%
if not "HTTPS" then
response.redirect([url]https://mysite.com/securepage.asp[/url])
end if
%>
Thanks for the help.
Kenneth Keeley
Kenneth Keeley Guest
-
http to https
Is there a coldfusion function that determines the gives me the protocol of the address bar(http, https) .I tried GetHttpRequestData, but I do not... -
Switching between http and https popping up a login box
Hi, I am response.redirecting from an http to a https site, as follows: ... -
PHP won't parse under https, but will with http
I'm not sure if this is the right forum for this question, but I'm hoping someone can help nonetheless. :) I installed an SSL Cert. on a site the... -
HTTPS to HTTP
When I am using server-side button to switch from https to http by using response.redirect "http://a.apsx" in response to the client event, I am... -
Switching to and from http and https
hello all. currently, this is how a line of my form is setup (names have been changed to protect the innocent ;) <form... -
Ray at #2
Re: Switching Between HTTP and HTTPS
"Kenneth Keeley" <kenkeeley@hotmail.com> wrote in message
news:e9bEtKgkDHA.2500@TK2MSFTNGP10.phx.gbl...This is not possible. Sessions cannot be maintained across different> So my questions are:
> 1) How to redirect to a Secure Page without losing Session Info?
protocols. You'll have to store the info server-side in a database, for
example.
HTTPS> 2) How to test if page is accessed by HTTPS, and if not switch toHere's an example:> quickly?
[url]http://www.aspfaq.com/2321[/url]
You'd probably also want to grab the querystring, should it exist. Maybe do
it like this instead (illustrative example):
<%
Dim sRedirect, sDomain, sPath, sQString
If UCase(Request.ServerVariables("HTTPS") = "OFF" Then
sDomain = Request.ServerVariables("SERVER_NAME")
sPath = Request.ServerVariables("SCRIPT_NAME")
sQString = Request.Querystring
sRedirect = "https://" & sDomain & sPath
If Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
Response.Redirect sRedirect
End If
%>
Ray at home
Ray at Guest
-
CS #3
Switching between http and https
I have two forms,1 is http and another is https. Https is a pop up form and
http is its opener.
Now, I want to pass back some data from Https side to its opener page but it
prompts message" permission denied."
Is it possible that i can refresh or pass back some data to the http page
from the Https side?
here's the code
RegisterStartupScript("save", "<script>try{window.opener.creditCard('" &
MemberPaymentID & "')}catch(e){var
frm=window.opener.frmMain;frm.MemberPaymentID.valu e='" & MemberPaymentID &
"';frm.Process.value='Save';frm.submit();} window.close();</script>")
CS Guest
-
Jason Brown [MSFT] #4
Re: Switching between http and https
I don't think it'll work using javascript - under the security model (IIRC),
an SSL site and it's non-SSL counterpart are effectively two different
domains.
http and https are cordoned off for a reason, though - have you fully
considered the implications of bouncing data in and out of the secure area?
isn't it better to keep it all cordoned off?
--
Jason Brown
Microsoft GTSC, IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
"CS" <CS@discussions.microsoft.com> wrote in message
news:4C28F77D-95CB-483A-96D3-746F4CCDE306@microsoft.com...>I have two forms,1 is http and another is https. Https is a pop up form and
> http is its opener.
> Now, I want to pass back some data from Https side to its opener page but
> it
> prompts message" permission denied."
> Is it possible that i can refresh or pass back some data to the http page
> from the Https side?
>
>
> here's the code
> RegisterStartupScript("save", "<script>try{window.opener.creditCard('"
> &
> MemberPaymentID & "')}catch(e){var
> frm=window.opener.frmMain;frm.MemberPaymentID.valu e='" & MemberPaymentID &
> "';frm.Process.value='Save';frm.submit();} window.close();</script>")
>
Jason Brown [MSFT] Guest



Reply With Quote

