473,554 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using ssl certificate in asp

2 New Member
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 7957
1,754 Recognized Expert Top Contributor
Hi there,

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

Aug 5 '06 #2
2 New Member
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 Recognized Expert Top Contributor
Hi there,

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

Aug 7 '06 #4
4 New Member
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 Recognized Expert Top Contributor
Hi Menon,

thanks for sharing the information with the rest.. good job.. keep it up buddy.. :)
Aug 10 '06 #6
1 New Member
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
56 New Member
If Request.ServerV ariables("SERVE R_PORT")=8080 Then
Dim strSecureURL
strSecureURL = "https://"
strSecureURL = strSecureURL & Request.ServerV ariables("SERVE R_NAME")
strSecureURL = strSecureURL & Request.ServerV ariables("URL")
strSecureURL = strSecureURL & "?" & Request.ServerV ariables("QUERY _STRING")
Response.Redire ct 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 Recognized Expert Contributor
Hi there,

Comment out your response.redire ct 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 Verisign and installed it on IIS. I am using HttpWebRequest to send the request across. I get an exception "Could not establish trust relationship with remote server." Can anyone guide me as how I...
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 the following error: The underlying connection was closed: Could not establish secure channel for SSL/TLS. at System.Net.HttpWebRequest.CheckFinalStatus() at...
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 version what is the best/recommended way for ASPNET apps to call web services that REQUIRE Client Certificates via SSL long version our company has new requirements, all servers must REQUIRE SSL and...
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 resources but i think some one needs to help me out. I am using IIS 5.1 on Windows XP professional. I am able to setup the SSL on my webserver using the 14 day trial period certificate. I setup...
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 accessing the website page, it shows a window to select the client certificate and then shows the page correctly. Im trying to do this by code (vs2003 C# aspnet), using webrequest.
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 company you have not choosen to trust.view the certificate to determine whether you want to trust the certificate authority. 2. the security date is valid. 3.the security certificate has a valid...
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 service defined by one of our vendors. They require, when I make these calls, that I identify myself with a digital certificate. All of their coding examples are for Java, and they have no immediate...
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on the service side, it can only receive one client certificate, since it derives System.Web.Services.WebService class, and it's Context.Request.ClientCertificate is a single HttpClientCertificate...
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 certificate for encryption. When I use the first one (i.e. add it to the ClientCertificates collection of the web request), I can establish a connection but I get a WebException: "Underlying connection...
by: Tery | last post by:
I'm trying to implement the Handango.com HTTP POST registration method. The instructions are here: http://www.handango.com/marketing/developerTeam/HTTP_Post_Reg_Model_How2.doc I'm stuck on how to encrypt a value using the public key in the Handango certificate. Does anyone have any suggestions or sample asp.net code on how to implement...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.