Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF : How to disable WCF Test Client

Tags:

I created a new WCF Application. It has a svc file & a code behind, When I try to debug (F5) then I see the following.

  1. If svc file is open & press F5 then it opens the web browser
  2. If code behind file is currently open & press F5 then WCF Test client opens.

Why there are different behavior? I do not want to use Test Client, how to disable it in the app so that it would not come again.

Atul Sureka

like image 504
Atul Sureka Avatar asked Dec 09 '11 06:12

Atul Sureka


People also ask

How do I enable WCF Test Client?

Inside Visual StudioAfter you create a new WCF service project and press F5 to start the debugger, the WCF Service Host begins to host the service in your project. Then, WCF Test Client opens and displays a list of service endpoints defined in the configuration file.

What is WCF Test Client?

The WCF Test Client tool is one of the tools provided by Visual Studio that can be found within the Visual Studio installation folder, such as C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE . Let's take a look at the detailed steps to use this tool: Launch the WCF Test Client tool from the command...

What is WCF Storm?

WcfStorm is a dead-simple, easy-to-use test workbench for WCF Services.


2 Answers

Open your project properties, go to the Debug tab, under start options you will see something like /client:"WcfTestClient.exe"

delete that line.

For a WCF Service Application and WCF Workflow Service Application you need to modify the .csproj.user file. A full write up can be found here.

The key part is

    <WebProjectProperties>       <EnableWcfTestClientForSVC>False</EnableWcfTestClientForSVC>     </WebProjectProperties> 
like image 150
Tod Avatar answered Nov 14 '22 07:11

Tod


I have been down this road MANY times over the years at different companies.... I forget and I found this page and while it is good advise for some, not helpful for me.

What DID fix this for a WCF application for me is this:

Note:  Visual Studio 2013  FYI  1. Right click on the your WCF project and click Properties 2. Click on left "Web" link/tab  --> Notice the Start Action Section 3. Check Radio Button   "Specific page"    4. Enter your .svc example   Service1.svc   5. Set project as startup and either hit F5 or right click and debug 6. Now the WCF Test Client launches   (for me at least)  

Hope this helps someone else.

like image 35
Tom Stickel Avatar answered Nov 14 '22 07:11

Tom Stickel