Aug
2008
WCF Sample in Visual studio 2008
Introduction
This post explains the procedure to develop the sample WCF Service and WCF Client in Visual studio 2008. Get an overview on WCF and WCF Terms.
1. Start open Visual studio 2008, Select new project option from file menu
2. Select the WCF ServiceApplication template from the project templates.
3. WCF Service describes the operations that perform in a service contract.
4.Declare the service contract in Iservice.cs interface and implement in the above Service class.
5. To test this service, you will need to create a client and use it to call the
service. You can do this using the svcutil.exe tool from the command line with
the following syntax: Generating a client using svcutil.
svcutil.exe http://localhost:53391/Service.svc?wsdl
6. The above command generates a code file and configuration file contains the client class. Add the two files to your client application and use the generated client class to call the service.
7. Client class which call the service looks like
8. The generated client configuration file looks like
9. The service configuration file looks like
Conclusion
The above post explains shows the standard way to create a service and client and calling the service. The Next posts explains each feature in depth.
Pingback: DotNetKicks.com
Pingback: TechBubbles » Hosting the WCF Service in .NET Executable