Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to automatically step into the server when debugging WCF

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"/>
          </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>
like image 991
Matt Avatar asked Aug 31 '09 20:08

Matt


1 Answers

<pre>
Add the below in your server config file
(i) Add below in app.config, if you are hosting your WCF service on windows service. 
<system.web>
  ...
  ...
  ...
  <compilation debug="true" /> 
</system.web>

(ii) Add below in web.config, if you are hosting your WCF service on IIS. 
<system.web>
  ...
  ...
  ...
  <compilation debug="true" /> 
</system.web>
</pre>
like image 148
Ramakrishna Talla Avatar answered Nov 02 '22 17:11

Ramakrishna Talla