Step 7: Create a Test Client Application

In this step, you create a Windows Forms application named Test Client to test the WCF service.

  1. Right-click your solution, click Add, and then click New Project.
  2. In the Add New Project dialog box, in the Templates section, select Windows Forms Application.
  3. In the Name field, type Test Client and then click OK to create a Windows Forms application.
  4. Right-click your client project and then click Add Service Reference.
  5. In the Add Service Reference dialog box, set the Service URI: to net.tcp://localhost:8523/WCFTestService and then click Go.
  6. Change the Service reference name: to WCFTestService and then click OK.

Step 8: Test the Client and WCF Service

In this step, you use the test client to ensure that the WCF service is running properly.

  1. In your client project, drag a button control onto your form.
  2. Double-click the button control to show the underlying code.
  3. In the code behind the button click, create an instance of the proxy, and call the DoWork() method of your WCF service.

    When you call the service, your current user security context will automatically be passed to your WCF service. The code should look as follows:

    private void button1_Click(object sender, EventArgs e)
          WCFTestService.MyServiceClient myService = 
             new WCFTestService.MyServiceClient();
          MessageBox.Show(myService.DoWork("Hello World!"));
  4. Right click the client project and then click Set as Startup Project.
  5. Run the client application by pressing F5 or CTRL+F5.

    When you click the button on the form, the message “Welcome Hello World!” should appear.

other ref: 

Host your WCF service with multiple host environment using multiple protocol

Friday, 19 August 2011 03:50:47 (Eastern Daylight Time, UTC-04:00)
chopard miglia watches replica cartier watches replica cartier replica omega watches replica omega watches for sale gucci watches replica rolex watches rolex cartier cpcp watches debt replica tag heuer watches watches tag heuer baignoire watches fake watches replica panerai watches niki breitling replica replica breitling.
Wednesday, 30 November 2011 04:09:27 (Eastern Standard Time, UTC-05:00)
Amazing kinds of watertight kids winter weather shoes uggs outlet are typically you can buy presently. Maybe you engulf with lots of possibilities already in the market, although the most important step should be to be cautiousuggs clearance the coffee quality plus the utilization of UGG Ultimate Braid Boots Sale this boots. vna2011YP1130 When your youngsters are incredibly effective possibly for the duration of boisterous times then you definately have to invest in a watertight winter weather shoes. This will give children to help easily experience the water so you should have this reassurance their legs Cheap Ugg Bailey Button Triplet are safe in addition to protected. However always watch on your little ones whenever they usually are participating in external seeing that car accident UGG Original Kids Boots seemed to be certain.
Wednesday, 30 November 2011 04:10:03 (Eastern Standard Time, UTC-05:00)
Should you have no idea about what uggs clearance are definitely the beneficial models connected with boots right now, subsequently underneath would be the number you could possibly look at;UniqueUGG Suede Boots Outlet logo and models currently have unique range of prices, such as Colimbia Bugazip shoes that you can buyuggs Clearance Sale for under $69.97. Most of these good shoes use a 400g Thinsulate Extra heat retaining material. vna2011YP1130 This nubuck in addition to even synthetic leather uppers cheap ugg boots usually are equalled by means of an injection created heat plastic cover; that 5 Wi gusseted zip is definitely watertight is really a wise decision besides for ones little ones but on your legs.
Wednesday, 30 November 2011 04:10:18 (Eastern Standard Time, UTC-05:00)
Salomon B52 Gore-Tex winter weather shoes are the ideal selection for solely $89.97.ugg boots outlet That shoes function is to be a watertight capable Gore-Tex product that could absolutely defend you actually for the duration ofNew UGG Gloves boisterous days to weeks. This affixed space-age foam sockliner reduces the risk for in addition to puts a stop to this freezing fresh air by ugg boots clearance leaks right up throughout the main.vna2011YP1130 This will assist your toes avoid all those parasitic organisms that will start out health problems. This Thinsulate heat retaining material in addition to polyurethaneUGG Knightsbridge Boots Outlet lined insoles allows that boots this strength, security plus the comfortugg boots outlet that a legs want. To help causes you to additional classy that shoes appears to be good having nylons, lean trousers in addition to shorts.
Wednesday, 04 January 2012 20:26:46 (Eastern Standard Time, UTC-05:00)
luxury watch watches replica rolex replica replica rolex watches omega 7 fake omega longines watches.
Thursday, 23 February 2012 01:47:45 (Eastern Standard Time, UTC-05:00)
wenger watches replica watches for sale sport watches tag heuer replica tag heuer watches, breitling replica navitimer breitling.
Thursday, 23 February 2012 03:11:40 (Eastern Standard Time, UTC-05:00)
designer watch watches replica swiss army watches fake tag heuer tag heuer carrera, replica rolex watches rolexes watches.
Thursday, 23 February 2012 19:56:37 (Eastern Standard Time, UTC-05:00)
Vintage boutiques Juicy Couture Casual Clothes Vintage hats Juicy Couture Outerwear T shirts vintage Party Dresses Online clothes Party Dresses Black cocktail Juicy Couture Pants Short prom dresses.
Saturday, 25 February 2012 00:55:48 (Eastern Standard Time, UTC-05:00)
Tuesday, 28 February 2012 19:59:23 (Eastern Standard Time, UTC-05:00)
buy watches fake watches replica watches fake omega omega quartz, fake breitling breitling chronomatic.
Monday, 05 March 2012 01:39:59 (Eastern Standard Time, UTC-05:00)
gold watches watches replicas expensive watches fake cartier watches cartier pasha, replica tudor watches fake tudor watches.
Monday, 05 March 2012 02:14:09 (Eastern Standard Time, UTC-05:00)
oil canvas paintings oil painting for sale oil painting class Poster Art oil paintings oil painting reproductions Impressionism oil paintings landscape oil paintings Street Scenes oil paintings oil painting canvas.
Monday, 05 March 2012 23:38:08 (Eastern Standard Time, UTC-05:00)
wholesale tattoo supply tattoo supplies tattoo pens Tattoo Case & Box tattoo gun supplies 4-10 Machine Tattoo Kits tattoos supplies.
Wednesday, 07 March 2012 05:04:27 (Eastern Standard Time, UTC-05:00)
gucci handbags for sale because the injury claims gucci rings not gucci handbags wholesale cheap gucci handbags to reach gucci for sale the designated position, while climbing tower crane.In 4 gucci leather belts hours of confrontation, please pay.
Sunday, 08 April 2012 06:16:08 (Eastern Daylight Time, UTC-04:00)
ei jordan 11 sale Dier eight jordans xi years working at buy jordan 11 PayPal buy jordan 11 , PayPal jordan 11 for sale platform has served as vice president , responsible for PayPals global payment buy jordan 11 platform , including mobile platforms . jordan shoes 11 </p> <p> do...
Sunday, 08 April 2012 10:39:17 (Eastern Daylight Time, UTC-04:00)
jordan shoes sale ts, a preset total score of 204.5 points, recommend the thunder win, a small branch.More attention to tiger jordan shoes sale basketball retro jordans lottery bets
In the Jordans On Sale indictment wrote: "after the match ends, Lori air jordan for sale jordan shoes for cheap close jordan shoes sale to th...
Comments are closed.