The server was unable to process the request due to an internal error

codelikeprogrammerwoman picture codelikeprogrammerwoman · Jan 13, 2014 · Viewed 68.1k times · Source

When i try to load method from webservice, i get an error:

"The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs"

This is my app.config endpoint def:

<services>
  <service name="Service" behaviorConfiguration="debug">
</services>

<client>
  <endpoint name="Service" address="net.tcp://localhost:12708/" binding="netTcpBinding" bindingConfiguration="netTcp" contract="path.IService" >
    <identity>
      <servicePrincipalName />
    </identity>
  </endpoint>
</client>

<serviceBehaviors>
    <behavior name="debug">
      <serviceDebug includeExceptionDetailInFaults="True" />
    </behavior>
  </serviceBehaviors>

I cannot see more information event if i have declared serviceBehaviors. Could somebody tell me how can i see more details about this error?

Answer

Pantelis Natsiavas picture Pantelis Natsiavas · Jan 13, 2014

The message of the error is quite clear. The server is configured to hide internal errors for security reasons.This is the default behaviour according to the fault handling in WCF MSDN post.

I see two options, both suppose that you have access to the server:

  • Enable showing the error details See the fault handling in WCF MSDN post. It provides details on how to setup your configuration, in the "Provide Additional Information When an Exception Occurs" section.

  • Debug using actual breakpoints This would be better. In my opinion, no error message could actually give you the insights a debugging session does.

Hope I helped!