WCF Test Client

Two things that should’ve been there since WCF v1. My colleague Alex Thissen already blogged about the WCF Library projects and the service host that comes with it. In beta 2 there’s a new test client that’ll connect to your service and will show you the available operations, configuration and allows you to invoke the operations.


When you take a look at the properties of your service library, you’ll notice that under the “Debug” tab page, a command line argument has been added: /client:”WcfTestClient.exe”. This allows it to start and connect to your service.

After a default installation, this client will crash upon connecting to your service. That’s because svcutil.exe isn’t signed in Beta 2, as you can read here and here. Unfortunately both bloggers don’t tell you where you can find svcutil. You can find it right here:

C:Program FilesMicrosoft SDKsWindowsv6.0abin

Open the Visual Studio 2008 command prompt, browse to that folder and delay sign it by executing the following command:

sn.exe -Vr svcutil.exe

Now both Service Util and the WCF Test Client work.

Technorati Tags: , ,

You may also like...

12 Responses

  1. Amol Wankhede says:

    Iam using Beta 2 For the Orcus. Any Idea / Steps How do I Invoke the test client for a service created and Hosted in IIS?


  2. Justin Mason says:

    Can you run WcfTestClient.exe from VS 2005? Is there a way to download and use it or is it only for the 2008 beta.


  3. I have no idea if it can be run from VS2005. It’s available in .NET 3.5 so it might not be. I haven’t checked yet if it has parameters or anything. VS2008 does have to provide the info to the tool, so it might. I’ll have to check it out yet. Maybe I’ll write some more about it.

    Although in time I didn’t like both tools as much as before though. Console apps still rule my world.

  4. Lorenz says:

    The client can be run from VS2005. Only VS 2005 is required. You will, however, uncover several issues with this setup. VS Orcas contains several improvements such as auto attaching the debugger to services. You have to do all of these things manually in VS2005. That’s why we chose to ship the tool only in VS Orcas.

  5. Alan says:

    Yes i ran sn.exe -Vr svcutil.exe but now i get the error “Error: Cannot obtain Metadata from http://localhost:8080/Service1/mex

    this comes from a wcf project where i press run without changing any of the generated code.

    Microsofts needs to get it’s act togeather as it relies on to much black magic to get things working

  6. Jon E. Ronnenberg says:

    @Alan: You have to have your mex bindings in place… You can easily add them with WCF Service Configuration Editor.

    Tools -> WCF Service Configuration Editor -> Ctrl+O -> choose your web.config file
    In the editor, choose Services and click on Create a new Service Endpoint… -> Choose the contract you want to expose -> Existing binding configuration, choose the appropriate mex* binding -> choose the endpoint address (can be the same as your contract endpoint) -> Finish

  7. Hasan Akram says:

    I am using visual studio 2008. I have two questions regsrding this feature of hosting a WCf service library and text cleint.
    1. is it possible to disable this feature of automatically hosting while debuging? i am hosting all my services in another project, so i need to disable them.

    2. is it possible to use this service host in run time, that means do i need to host services separately or can i use this feature for hosting all my services?

  8. Hasan,

    1. I don’t know but I don’t think so. You should however create a class library instead of a WCF Service Library.

    2. I’m not entirely sure what you mean here. Do you want to use this host on production? Is that wise? Because how would you be able to monitor that host, see when it fails and why? If you mean starting it seperately from VS2008, I don’t know. It might be possible, but I don’t know how.

  9. aro says:

    Hi Guys,

    If you guys are looking for a more up-to-date tool that you can use to do Functional and Performance testing on WCF Services, check this out.

    blog : http://geekswithblogs.net/Erik/archive/2009/04/02/130664.aspx

    direct download : http://www.fileden.com/files/2009/4/1/2388287/WcfStorm-Setup.zip

  10. aro says:

    The WCFStorm site is up : http://www.wcfstorm.com. You can download the tool there.

  11. People deserve good life time and loans or just student loan would make it much better. Just because freedom bases on money state.

Leave a Reply

Your email address will not be published. Required fields are marked *