Go to DotNetFunda.com
 Online : 1324 |  Welcome, Guest!   Login
 
Home > Articles > WCF > SSl with self hosted WCf Services

  • Nominate yourself for "Agile Software Development using Scrum" online session for FREE, click here (Hurry, limited seats).

  • Download OOPS and ASP.NET Online training session video and PPT from here.

Submit Article | Articles Home | Search Articles |

SSl with self hosted WCf Services

 Posted on: 11/25/2009 5:35:18 PM by Anup1252000 | Views: 905 | Category: WCF | Level: Beginner | Print Article
In this article, we are going to see how to use Transport Security with Self hosting by using SSL.

Ask all your .NET related questions/clarifications here to get quicker solution.

Introduction

       In this article,we are going to see how to use Transport security with Self Hosting by using SSL. Please Refer this link http://msdn.microsoft.com/en-us/library/ms733791.aspx. This link contains information about how to set SSl for Self hosting.

Lets go through this application step by step

Step1:


      Open VS 2008>New Project>Console Application>Give the name> Select c# as a programming language.

Step2:

      Now give System.ServiceModel reference to the console application project.

Step3:

      Now,lets write Service Contract,operation contract and so on in our service application.

     

I am setting the port to 8000. your url format should be like this https://computername:port no/service name


Step4:

        Now lets config the application configuration file(app.config). For configuring app.config, i am using a tool called WCF Service Configuration Editor. Please refer this link http://msdn.microsoft.com/en-us/library/ms732009.aspx. It contains information about WCF Service Configuration Editor.


         



Step5:

        Now check whether your application is running properly. If any errors fix those. 


Step6:

        Now, Lets create the client application. give reference to System.ServiceModel. lets use a tool called Svcutil.exe to generate the proxy. open VS cmd prompt> type in as svcutil /out:proxy.cs /config:app.config "https://computer name:8000/service" . It will automatically generate proxy.cs and app.config in the specific location. Copy those files and pate it into our client app. 


Step7:
        Now write these lines in the program.cs file





Step8:

         Now Lets run this application


Conclusion
    I hope you people like this article.


If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Interesting?   Share and Bookmark this kick it on DotNetKicks.com


About anup hosur

Experience:2 year(s)
Home page:
Member since:Saturday, August 01, 2009
Level:Starter
Status: [Member]
Biography:
 Latest post(s) from Anup1252000

   ◘ Ajax Enabled WCF Service posted on 2/15/2010 1:10:10 AM
   ◘ Membership provider with WCF posted on 2/11/2010 7:00:47 AM
   ◘ Creating Multiple Channels in Channel factory in WCF posted on 2/11/2010 4:06:00 AM
   ◘ WCF Hosting in Windows Services posted on 1/28/2010 7:53:50 AM
   ◘ SSl with self hosted WCf Services posted on 11/25/2009 5:35:18 PM


Submit Article

About Us | The Team | Advertise | Contact Us | Feedback | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found copied contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
All rights reserved to DotNetFunda.Com. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
(Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher)