WCF : How to disable WCF Test Client

前端 未结 8 1664
悲哀的现实
悲哀的现实 2020-12-24 02:31

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 t
相关标签:
8条回答
  • 2020-12-24 03:10

    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>
    
    0 讨论(0)
  • 2020-12-24 03:15

    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.

    0 讨论(0)
  • 2020-12-24 03:20

    for future view ... when i was in a svc file, and hit f5, it always start this utility ... i try the param in the project file, don't work ...

    then, in property, i change the setting in web, from Current page, to my default page :)

    now i don't have this utility popping each time :)

    0 讨论(0)
  • 2020-12-24 03:20

    If you want to run the project in a browser,

    1. Go to the properties of the project
    2. Click -> Web
    3. In the servers section, mention the iis (iisexpress, local IIS) and specify the URL "http://localhost:11111/"

    this will take the program to the browser

    To take it only to wcf test client, follow the above steps, but the URL should point to the service. http://localhost:11111/yourservice.svc .. will do.

    Thank you

    0 讨论(0)
  • 2020-12-24 03:22

    To control the WCF Test Client auto-launch in Visual Studio 2015/2017 you can do the following:

    Right-click the WCF Service Project in Solution Explorer, choose Properties, and click WCF Options tab. Clear the checkbox Start WCF Service Host when debugging another project in the same solution (that check box is enabled by default).

    0 讨论(0)
  • 2020-12-24 03:22

    It is easier than that.

    • 1.- Open Project properties.
    • 2.- Debug tab
    • 3.- Remove the "/client:"WcfTestClient.exe" appearing in the "comand line arguments" textbox.
    • 4.- Done!
    0 讨论(0)
提交回复
热议问题