Our application accesses the WCF service, which is hosted by the Windows service on the same computer. The client application and the service will always be on the same computer.
I created a Windows service that hosts the WCF service. To test my Windows service code, I created a console application that contains the same app.config file and code as my Windows service. I run the console application in one debug thread and run my client in another debug thread. Everything works fine, and I can easily use the debugger.
Now the pen ...
So, I created the installer and installed my Windows service. After starting successfully, I successfully added the Service Reference to my client using http: // localhost / VssService in Visual Studio 2010. I successfully connected to the service through the "Attach To Process". I started my client in the debug stream, but when I try to enter the remote method, I get "Unable to automatically go to the server. The debugger could not stop the server process." This happens for both [NetNamedPipeBinding_IVssService] and [BasicHttpBinding_IVssService]. I struggled with this watch and ran out of ideas, so I hope you can help me. I have included the app.config files for my Windows Service and Client application. Hope they help.
I appreciate your time to read this question and hope you can help solve this problem ...
Mike
====================== APP.CONFIG SERVICE ========================= =============================================
<services>
<service behaviorConfiguration="VssServiceBehavior" name="ClientSaver.VssService.VssService">
<endpoint address="net.pipe://localhost/VssService/Pipe/" binding="netNamedPipeBinding"
bindingConfiguration="" contract="ClientSaver.VssService.IVssService" />
<endpoint address="http://localhost/VssService/" binding="basicHttpBinding"
bindingConfiguration="" contract="ClientSaver.VssService.IVssService" />
<endpoint address="http://localhost/VssService/MEX/" binding="mexHttpBinding"
bindingConfiguration="" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/VssService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="VssServiceBehavior">
<serviceMetadata httpGetEnabled="True" policyVersion="Policy15" />
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
========================== CLIENT APP.CONFIG ======================= ========
<endpoint address="http://localhost/VssService/" binding="basicHttpBinding"
bindingConfiguration="" contract="ClientSaver.VssService.IVssService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="VssServiceBehavior">
<serviceMetadata httpGetEnabled="true" policyVersion="Policy15" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
source
share