Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to debug WCF service message

I've got a Visual Studio 2008 solution with a WCF service, and a client.

When I run my client, and call a method from my service I get a message saying "Unable to automatically debug 'Home.Service'. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the server."

I've googled around, and have tried the following.

<system.web>    <compilation debug="true" /> </system.web> 

has been added in app.config on both the client and the server.

I have also made sure that the project is being compiled in Debug mode.

What else could be causing this message?

Edit: Added more info based on feedback questions

  • It is using wsHttpBinding
  • I have set

    <serviceDebug includeExceptionDetailInFaults="true"/> 
  • I am using

    var service = new HomeReference.HomeServiceClient(); service.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials; 

Unfortunately the error shows up the first time I call a method on my Service. I can dismiss the messagebox, and the application continues working. Any Exceptions thrown on the server at not propagated back to the client though (I assume it should?)

like image 936
Frode Lillerud Avatar asked Nov 24 '08 19:11

Frode Lillerud


People also ask

How do I debug a WCF service?

To debug a WCF service in visual studio 2010, go to Debug -> Attach to Process. Check "Show processes from all users", and choose w3p.exe if you are using IIS, or the name of the application if not. Put in a breakpoint, make the call, and then you can then start debugging.

How do you debug a WCF Test Client?

WCF Service Host Starts WCF Test Client with a Single Service. After 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.


1 Answers

I was fighting with this exact same error for over an hour and low and behold I restarted VS2008 and it magically fixed itself. Give it a try as it might save you some time.

like image 79
Exist Avatar answered Sep 19 '22 19:09

Exist