1

I have a WCF webservice that gives me the following message whenever I'm trying to use it:

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 <serviceDebug> 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.

My question simply is - how can I turn on IncludeExceptionDetailInFaults? I know this has been asked like a million times around the web but no matter what I do I just can't get it work. Please save yourself pasting this Turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server

I have read it countless times and tried everything but still nothing. I'm changing includeExceptionDetailInFaults to true and false and I can see no difference. Nothing happens so I must be missing something. Or am I looking in wrong place? Where should I look for those?

Anyway here's my Web.config (part of it). If you need a complete config file I can post it but I have to change all the names etc. in it.

<services>
  <service name="FOO.BAR.Services.CRMServices.Service1">
    <endpoint address="" behaviorConfiguration="jsonBehavior" binding="webHttpBinding" bindingConfiguration="Service1Binding" contract="FOO.BAR.Services.CRMServices.IService1" />
  </service>
  <service name="FOO.BAR.Services.CRMServices.Service2" behaviorConfiguration="debug">
    <endpoint address="" behaviorConfiguration="jsonBehavior" binding="webHttpBinding" bindingConfiguration="Service2Binding" name="FOO.BAR.Services.CRMServices.Service2" contract="FOO.BAR.Services.CRMServices.IService2" />
  </service>
</services>
<behaviors>
  <endpointBehaviors>
    <behavior name="jsonBehavior">
      <webHttp />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>   
    <behavior name="debug">   
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

So I'm trying to use Service2. Hope you guys can spot what's wrong with that? Only thing I see that is different from the other question I linked is that I have two services. Also there was httpGetEnabled property already in the config file but removing it didn't make difference either.

WCF service that I'm trying to run is made by another guy. I just got the Visual Studio solution, set up IIS and hosted that service there. I haven't done anything like that before so it can also be something to do with my configurations I think.

Community
  • 1
  • 1
kivikall
  • 786
  • 2
  • 13
  • 29
  • you should apply the "debug" behavior to your Service2. Also make sure Service1 and Service2 have their own web.config setup with `` – Lithium Aug 14 '15 at 14:42
  • @Lithium I have behaviorConfiguration="debug" there. So that is not enough? How should I apply debug behavior? – kivikall Aug 14 '15 at 14:46
  • Sorry forget about applying the "debug" behavior. In fact the error you've got could be thrown by Service1 or Service2, If true, enable IncludeExceptionDetails in those services. – Lithium Aug 14 '15 at 14:51
  • are you sure that you are editing correct config file? – Pankaj Kapare Aug 14 '15 at 19:42
  • Where is your bindingConfiguration="Service2Binding/Service1Binding" situated? – jtabuloc Aug 18 '15 at 06:48

0 Answers0