| | |
httpS &SSL
Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
![]() |
You use https:// in C# whenever you are accessing an https:// website. I don't really know of another way to answer that question. SSL is handled under the hood for the most part by the framework so you don't have to worry about it.
Here is an example of an https:// post to an online merchant:
Here is an example of an https:// post to an online merchant:
c# Syntax (Toggle Plain Text)
public void Post() { string args = GetPostUrlArgs(); string result = string.Empty; HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(@"https://secure.authorize.net/gateway/transact.dll"); objRequest.Method = "POST"; objRequest.ContentLength = args.Length; objRequest.ContentType = "application/x-www-form-urlencoded"; StreamWriter myWriter = null; try { myWriter = new StreamWriter(objRequest.GetRequestStream()); myWriter.Write(args); } finally { myWriter.Close(); myWriter.Dispose(); } HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse(); using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) { result = sr.ReadToEnd(); sr.Close(); sr.Dispose(); } this.Response = new CcTxResponse(result); }
•
•
Join Date: Jun 2009
Posts: 124
Reputation:
Solved Threads: 11
There is nothing to do with https and SSL. in C#. All these are server side stuffs. If any domain is installed with SSL certification then that domain can be accessed by https. You need to have dedicated IP address for that website and that website needs to have SSL certificate installed within the IIS.
Last edited by thewebhostingdi; Jun 11th, 2009 at 10:22 am.
•
•
•
•
There is nothing to do with https and SSL. in C#. All these are server side stuffs. If any domain is installed with SSL certification then that domain can be accessed by https. You need to have dedicated IP address for that website and that website needs to have SSL certificate installed within the IIS.
C# Has plenty of types related to SSL:
System.Security.Cryptography.X509Certificates
System.Net.Security.SslStream
There are more, take a look at the help file.
![]() |
Similar Threads
- URL Validation (PHP)
- Can't Access HTTPS sites (Windows NT / 2000 / XP)
- Lets talk about SSL certificates! (IT Professionals' Lounge)
- Missing Library in Compiling (C++)
- Https? (DaniWeb Community Feedback)
- Help With Wireless Netgear & SSL (Networking Hardware Configuration)
- HTTPS to HTTPS - Before Cert? (Linux Servers and Apache)
- This ought to be simple - extra spaces (PHP)
- msn messenger not working.. SSL (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: Simple Operating System in C#
- Next Thread: Saving Binary data to sql server 2000
Views: 445 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array barchart bitmap box broadcast button buttons c# chat check checkbox class client code color control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms ftp function gcd gdi+ http httpwebrequest image index input java list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox save saving server sleep socket sql statistics stream string table textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






