Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
801 views
in Technique[技术] by (71.8m points)

visual studio 2008 - 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?)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...