error: "Try again by typing https:// " - pls help

M

Meya

Hi,

when I hit my http://<domain name> site,I am getting this
error msg: I have also installed my SSL cert on the IIS 5.0

********************************
The page must be viewed over a secure channel

Please try the following:

Try again by typing https:// at the beginning of the
address you are attempting to reach.

HTTP 403.4 - Forbidden: SSL required
Internet Information Services
**********************************

need quick assistance from anyone to resolve this issue,
many thanks in advance.

cheers
Meya
 
R

Ray at

What solution are you after? Open IIS manager and take a look at the
"Secure Communications" section on the Directory Security tab on your site
properties.

Or, if you're looking to automatically redirect to https from http, see
http://www.aspfaq.com/show.asp?id=2321

Here is my slightly modified version of that though:

<%
if Request.ServerVariables("HTTPS") = "off" then
srvname = Request.ServerVariables("SERVER_NAME")
scrname = Request.ServerVariables("SCRIPT_NAME")
sQString = Request.Querystring
sRedirect = "https://" & srvname & scrname
If Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
Response.Redirect sRedirect
end if
%>

You can set that up as a custom 403.4.

Ray at home
 
A

Aaron Bertrand - MVP

Here is my slightly modified version of that though:

Nice touch. I'll do you one better, though. :)

This version will also correctly transfer variables that came in to the page
using the POST method.

<%
if sv("HTTPS") = "off" then
method = sv("REQUEST_METHOD")
srvname = sv("SERVER_NAME")
scrname = sv("SCRIPT_NAME")
sRedirect = "https://" & srvname & scrname
if method = "POST" then
Response.Write "<form method=post action=" & _
sRedirect & " name='f'>"
for x = 1 to Request.Form.Count()
Response.Write "<input type=hidden name=" & _
Request.Form.Key(x) & " value=""" & _
Server.HTMLEncode(Request.Form.Item(x)) & _
""">" & vbCrLf
next
Response.Write "<input type=submit value=Go></form>"
Response.Write "<script>" & vbCrLf
Response.Write "document.f.submit();" & vbCrLf
Response.Write "</script>"
else
sQString = Request.Querystring
If Len(sQString) > 0 Then sRedirect = sRedirect & "?" & sQString
Response.Redirect sRedirect
end if
end if

function sv(s)
sv = Request.ServerVariables(s)
end function
%>

(With the obvious disclaimer that the post method won't work for William
Tasso. :))
 
R

Ray at

"(Sorry, William Tasso, but the post method here relies on client-side
script, so won't work for you — you'll actually have to click on the Go
button.)"

This is one of those times that the ROTFLAMO or whatever would be in order.
That's a riot!

Ray at work
 
A

Aaron Bertrand - MVP

Well, every time I write any example that relies on JavaScript, I remember
that I have to deal with the people who refuse to join the rest of society.
I think of some guy wandering around a nudist camp with a blindfold on. If
you're that afraid of the web, get off of it! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,366
Latest member
IanCulpepp

Latest Threads

Top