HTTPS = SSL + Webservice + Verisign
- Step 1. Install Server Certificates on the Web Server
- Step 2. Create a Web Service

- Step 3. Configure the Web Service Virtual Directory to Require SSL
- Step 4. Test the Web Service Using a Browser
- Step 5. Install the Certificate Authority’s Certificate on the Client Computer
- Step 6. Develop a Web Application to Call the Serviced Component
Step 1. Install Server Certificates on the Web Serverin IIS right click on Default Web Site & goto Directory Security tab then click on Server Certificate button then follow the wizard and that wizard will generate a base64 coded information in text file which u will have to forward to CA (Certificate Authority) in my case CA is VeriSign, CA will return you encrypted information which you have to save as any-name.cer and start that wizard again and select first option by name like process pending …. then follow the wizard and provide it that encrypted information which u got in response of your information from your CA after completion of wizard click on Edit button in Directory Security tab under Secure Communication section and check the Require Secure Channel (SSL)
Step 2. Create a Web Service
To create a simple Web service on the Web service host computer
- Start Visual Studio .NET and create a new C# ASP.NET Web Service application called SecureMath.
- Rename service1.asmx as math.asmx.
- Open math.asmx.cs and rename the Service1 class as math.
- Add the following Web method to the math class.
[WebMethod]
public long Add(long operand1, long operand2)
{
return (operand1 + operand2);
}
- To create the Web service, click Build Solution on the Build menu.
Step 3. Configure the Web Service Virtual Directory to Require SSL
in IIS right click on your web service’s (in our case Secure Math) virtual directory and goto Directory Security tab and then under Secure Communication Section click on Edit button and then check Require Secure Channel (SSL) if unchecked;)
Step 4. Test the Web Service Using a Browser
https://WebServer/securemath/math.asmx
Step 5. Install the Certificate Authority’s Certificate on the Client Computer
launch Internet Explorer expand Tools menu and click on Internet Options then select Content tab then Certificate button and then Import that file which your CA send you and which you store as any-name.cer
Step 6. Develop a Web Application to Call the Serviced Component
- On the Web service client computer, create a new C# ASP.NET Web application called SecureMathClient.
- Add a Web reference (by using HTTPS) to the Web service.
- Right-click the References node within Solution Explorer, and then click Add Web Reference.
- In the Add Web Reference dialog box, enter the URL of your Web service. Make sure you use an HTTPS URL.
Note If you have already set a Web
reference to a Web service without using HTTPS, you can manually edit
the generated proxy class file and change the line of code that sets
the Url property from an HTTP URL to an HTTPS URL.
- Click Add Reference.
- Open WebForm1.aspx.cs and add the following using statement beneath the existing using statements.
using SecureMathClient.WebReference1;
- View WebForm1.aspx in Designer mode and create a form like the one illustrated in Figure 2 using the following IDs:
- operand1
- operand2
- result
- add

Figure 2. WebForm1.aspx form
- Double-click the Add button to create a button-click event hander.
- Add the following code to the event handler.
private void add_Click(object sender, System.EventArgs e)
{
math mathService = new math();
int addResult = (int) mathService.Add( Int32.Parse(operand1.Text),
Int32.Parse(operand2.Text));
result.Text = addResult.ToString();
}
- On the Build menu, click Build Solution.
- Run the application. Enter two numbers to add, and then click the Add button.The Web application will call the Web service using SSL.