472,353 Members | 1,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

using ssl certificate in asp

Hi all,

I want to build an online shop with asp. Could you give me any idea on using ssl? Shall I purchase the ssl certificate first then set the key in the server? Do I need to do anything in the asp code? Or the "http" is the only thing needs to be changed?(change to "https" ?)

Any advice would be appreciated.
Aug 5 '06 #1
8 7778
1,754 Expert 1GB
Hi there,

pls refer to the link attached.. take care my fren..

Aug 5 '06 #2
Hi Sashi, thanks for the link and I really appreciate it.
However, my case is a little bit different from John's. The details of my customer include some sensitive information and they will be saved in the database on my server, I guess I have to install the ssl certificate to protect those details when my customer submit the form. The problem is I have no idea how to apply ssl/ssl encryption in asp file. Is there any place that I can learn it? Or someone can explain it?
Aug 5 '06 #3
1,754 Expert 1GB
Hi there,

check out the attached links below.. hope it helps you to get started with SSL.. take care..

Aug 7 '06 #4
Hi Guys!

Please Refer this link, you will find more about Forcing http:// to https://


best regards,
Kalipurayath Sanal Menon
Aug 8 '06 #5
1,754 Expert 1GB
Hi Menon,

thanks for sharing the information with the rest.. good job.. keep it up buddy.. :)
Aug 10 '06 #6
This is great! The only modification I would make is to add the query string in one of two ways:

Expand|Select|Wrap|Line Numbers
  1. <%
  2.    If Request.ServerVariables("SERVER_PORT")=80 Then
  3.       Dim strSecureURL
  4.       strSecureURL = "https://"
  5.       strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
  6.       strSecureURL = strSecureURL & Request.ServerVariables("URL")
  7.       strSecureURL = strSecureURL & "?" & Request.ServerVariables("QUERY_STRING")
  8.       Response.Redirect strSecureURL
  9.    End If
  10. %>

Expand|Select|Wrap|Line Numbers
  1. <%
  2.    If Request.ServerVariables("SERVER_PORT")=80 Then
  3.       Dim strSecureURL
  4.       strSecureURL = "https://"
  5.       strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
  6.       strSecureURL = strSecureURL & Request.ServerVariables("HTTP_X_REWRITE_URL")
  7.       Response.Redirect strSecureURL
  8.    End If
  9. %>
and as suggested include this file on a page to force it to use SSL.

BTW, when I wrote a similar script I used HTTPS server variable which returns on or off. Same final result as checking the port for 80 vs. 443.

To see all of the server variables use the following:

Expand|Select|Wrap|Line Numbers
  1. for each x in Request.ServerVariables
  2.   response.write("<b>" & x & ":</b><br /><pre>" & Request.ServerVariables(x) & "</pre><br /><br />")
  3. next
Happy coding:
Aug 12 '06 #7
If Request.ServerVariables("SERVER_PORT")=8080 Then
Dim strSecureURL
strSecureURL = "https://"
strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
strSecureURL = strSecureURL & Request.ServerVariables("URL")
strSecureURL = strSecureURL & "?" & Request.ServerVariables("QUERY_STRING")
Response.Redirect strSecureURL

End If

The code is not working.. i am getting page cud not b found can anyvbody pl help
Mar 4 '08 #8
979 Expert 512MB
Hi there,

Comment out your response.redirect and add a response.write. You'll be able to see what the url you are trying to navigate to is and hopefully see what is wrong with it.

Hope this helps,

Dr B
Mar 4 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Ashutosh Bhalerao | last post by:
Hi all, I am trying to write a VB.Net application which communicates over SSL with an IIS server. I have got a temporary certificate from...
by: Subra Mallampalli | last post by:
Hi, I am trying to connect over HTTPS using a client certificate. I am able to connect fine when using IE. From my application, however, I get...
by: Tim Burris | last post by:
At the top here i will put a quick description of my problem followed by the long description. This way you want get bored reading! : short...
by: dinoo | last post by:
Can some body help me out? I am trying to use client certificates in a Webservice. But some how i am not able to make it. I went through the msdn...
by: Nelson R. | last post by:
Hi, i need to get some info from a website page that requires an certificate. Ive got the provided certificate installed in IE, and when...
by: S.Vidya | last post by:
when accessing the URL using Https,the security alert box pop up everytime. how to block that security alert box showing 1.Certificate issued by a...
by: Bryan Slatner | last post by:
I'm having some difficulty finding the information I need. Maybe someone can point me in the right direction. I need to call methods on a web...
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on...
by: b.fokke | last post by:
I'd like to connect to a webservice using TLS/SSL. I have two separate client certificates: 1. A certificate for digital verification 2. A...
by: Tery | last post by:
I'm trying to implement the Handango.com HTTP POST registration method. The instructions are here:...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.