473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Force HTTPS

Is there a way to use HTTPS only on certain pages? I have two pages that I
want to use my SSL Cert, but the rest of the files I do not... they are all
in the same folder, and I can not move them.
Jul 19 '05 #1
7 12372
Actually, you can do this with ASP...

http://support.microsoft.com/support.../Q239/8/75.asp

"Andrew Durstewitz" <ad******@devbuilder.org> wrote in message
news:3f*********************@news.frii.net...
You need to do this in IIS not ASP. I would ask this question in an IIS
newsgroup.

-Andrew

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.

Jul 19 '05 #2
You could add something like this to the top of your pages:

<%

If UCase(Request.ServerVariables("HTTPS")) = "OFF" Then
'''get page
sRedirect = "https://" & Request.ServerVariables("SERVER_NAME") &
Request.ServerVariables("PATH_INFO") & "?" & Request.Querystring
Response.Redirect sRedirect
End If

%>

Ray at work

"John McDermidt" <jmcdt73_at_msn.com> wrote in message
news:OY**************@tk2msftngp13.phx.gbl...
Is there a way to use HTTPS only on certain pages? I have two pages that I
want to use my SSL Cert, but the rest of the files I do not... they are all in the same folder, and I can not move them.

Jul 19 '05 #3
Neat. I never knew you could do it with ASP. I just allways did it
with the server configuration.

-Andrew

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.
Jul 19 '05 #4
Individual items have a security tab as well. Right click the page inside
the IIS snap in & go to properties. Click the security tab, edit the cert,
and check off the only allow ssl connections. The individual settings
override the global ones.

HTH

DP
"John McDermidt" <jmcdt73_at_msn.com> wrote in message
news:OY**************@tk2msftngp13.phx.gbl...
Is there a way to use HTTPS only on certain pages? I have two pages that I
want to use my SSL Cert, but the rest of the files I do not... they are all in the same folder, and I can not move them.

Jul 19 '05 #5
On Thu, 3 Jul 2003 09:44:34 -0400, "John McDermidt"
<jmcdt73_at_msn.com> wrote:
Is there a way to use HTTPS only on certain pages? I have two pages that I
want to use my SSL Cert, but the rest of the files I do not... they are all
in the same folder, and I can not move them.
Yes, set the entire folder to SSL and just use https on the two pages.
Or, just set each page to SSL in the MMC. If you are on a shared
hosting environment have your hosting company do this for you.

John Cesta

http://www.cybersmarts.net
-------------------------------------------
ColdFusion Hosting Includes 10 Domains
100% Browser Based Administration
---------------------------------
LogFileManager - The only IIS Logfile Management Tool
DomainReportIt PRO - Helps Convert IIS Installs
http://www.serverautomationtools.com


Jul 19 '05 #6
I didn't know you could do it via individual page properties. The method I
use is:

<%
dim myname
dim i

myname = Request.ServerVariables("SCRIPT_NAME")
i = instr(myname, ">")
if i > 0 then myname = left(myname, i-1)
do while left(myname,1) = "/"
myname = mid(myname, 2)
loop

if ucase(Request.ServerVariables("HTTPS")) = "OFF" then
response.redirect https://<siteurl>/ & myname
end if
%>

The <siteurl> is the base of the current page.

By putting this code before any HTML code on the ASP page, the ASP page will
only show with SSL. If the user cancels the certificate or security switch,
the previous page will remain the current page.

Mike Ober.

"Splatter" <me@me.net> wrote in message
news:nK****************@news.uswest.net...
Individual items have a security tab as well. Right click the page inside
the IIS snap in & go to properties. Click the security tab, edit the cert,
and check off the only allow ssl connections. The individual settings
override the global ones.

HTH

DP
"John McDermidt" <jmcdt73_at_msn.com> wrote in message
news:OY**************@tk2msftngp13.phx.gbl...
Is there a way to use HTTPS only on certain pages? I have two pages that I want to use my SSL Cert, but the rest of the files I do not... they are

all
in the same folder, and I can not move them.


Jul 19 '05 #7

"Michael D. Ober" <obermd-@-alum-mit-edu-nospam> wrote in message
news:b4****************@news.uswest.net...
I didn't know you could do it via individual page properties. The method I use is:
"Splatter" <me@me.net> wrote in message
news:nK****************@news.uswest.net...
Individual items have a security tab as well. Right click the page inside the IIS snap in & go to properties. Click the security tab, edit the cert, and check off the only allow ssl connections. The individual settings
override the global ones

By putting this code before any HTML code on the ASP page, the ASP page will only show with SSL. If the user cancels the certificate or security switch, the previous page will remain the current page.

Mike Ober.


Thanks Mike I'll remember that. Yes they do, which is handy with non
WebPages as well. I have a zip file I wanted to host to everyone not just
my users via ssl and I was able to override the sight security on that file
so it can be served anonymously.

DP
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: SPuR | last post by:
Hi, I'm developing an asp.net page and I need to force windows authentication in a https server. When I request the page for first time, it request me for authentication, but I need that each time...
4
by: ronen | last post by:
Hi, There are times when Passport users can sign in, on an ASP.NET site, without being prompted for credentials. This happens, as far as I know, when Passport accounts are stored locally (or...
7
by: Scott | last post by:
Is there a way to check if the current (web service)connection is using ssl? I'd like to be able to check for this and return an error if the connection isn't secure. I work in a heavily regulated...
5
by: devgrt | last post by:
<--> We post some xml to https as shown below. The server supports SSL 3.0 and TLS. We wnat to force the PocketPC 2003 application to only use TLS for FIPs compliance. Is that possible? I see in...
0
by: Dave | last post by:
I noticed if I access a web service such as: https://MySite/WebServices/Service.asmx In the View Source, the Invoke button wants to submit the form to post to just "http". How do you preserve...
1
by: Mr. Novice | last post by:
When I would try to connect to a Virtual Server Host's admin page from Win2k Pro I would be prompted for credentials. Now that my employer has gone to XP IE goes straight to saying "You are not...
2
by: Sergej Prokoviev | last post by:
We are running our site at www.waynesavings.com on secure hosting (Server 2003, IIS). We are using a custom 403.4 error page (called 403_4.asp, located under root) to redirect all users to https if...
3
by: curt.ziegler | last post by:
I know this can be done in IIS, and it may even be the preferred method but can someone help me redirect every http request to https? I think it could be done in the global.asax.cs or web.config...
1
by: Anonieko | last post by:
> A solution 1. Add a certificate in the site. Check Required SSL (Right click web site->properties->Directory Security->Server Communcations->Edit 2. In IIS manager, right click on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.