views:

2059

answers:

2

I get the dreaded:

Unable to automatically step into the server. The remote procedure could not be debugged.This usually indicates that debugging has not been enabled on the server."

Now, I have been reading that I need to add

<compilation debug="true">

to the web.config .

Fair enough, my problem is that my WCF service is a nettcp binding hosted in a windows process.

Where do I add this? In the app.config of the windows service hostiung the WCF service?

In what section? Right now my app.config for the Windows Service Host looks like this :

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <system.serviceModel>
    <services>
      <service name="Indexer" behaviorConfiguration="IndexerServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8000/Indexer"/&gt;
          </baseAddresses>
        </host>
        <endpoint address="net.tcp://localhost:9000/Indexer"
                  binding="netTcpBinding"
                  bindingConfiguration="Binding1"
                  contract="WCF.IIndexer" />
      </service>
    </services>
    <bindings>
      <netTcpBinding>
        <binding name="Binding1"
                     hostNameComparisonMode="StrongWildcard"
                     sendTimeout="00:10:00"
                     maxReceivedMessageSize="65536"
                     transferMode="Buffered"
                     portSharingEnabled="false">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message clientCredentialType="None" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="IndexerServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>

  </system.serviceModel>

</configuration>
+2  A: 

This did it

Matt
odd - that's a solution for hosting WCF services in IIS - you said you were self-hosting, no?? So how did that help...... (one of those things that make you go hmm........)
marc_s
+1 thanks for sharing!
marc_s
A: 

Hi,

I have just had the same problem. In order to be able to debug a WCF service, you should add the in the server's config file inside the section.

For more details, please check the link: http://msdn.microsoft.com/en-us/library/bb157687.aspx

dann