Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

i have developed a new web service, when i run it from visual studio it runs "wcf test client"

it works fine if i test all function from "wcf test client" or if we add reference in to web site locally.

but if i create website some where else and add web service via "add web service" put url(""). then it will not work,throw error:

You cannot call a method on a null-valued expression.At C:\shutdown.ps1:17 char:37+ $result = $vmshut.InitiateShutdown <<<< ("$true","no comment") + CategoryInfo : InvalidOperation: (InitiateShutdown:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull unable to shutdown wintest

1 solution

In order to get WcfTestClient to run when debugging a service, open up the project properties and under the run tab, choose Start Action | Specific page and select the .svc file you want to debug. It will launch WCFTestClient properly.
Share this answer
prateekfgiet 5-Mar-12 5:25am    
i am able to launch WCFTestClient.
my problem when i call function from WCFTestClient its working fine but when i host same application in iis then call from different website by adding add webservices. its giving error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900