Reputation: 3579
I have created WCF + WF service.
I have added the binding and trying to access and execute my WF from my test application, but getting such exception, what does it mean and how do I solve 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 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 3.0 SDK documentation and inspect the server trace logs.
Thanks
Upvotes: 1
Views: 2885
Reputation: 968
To send the exceptions to the client, so you can view the exception details there, add the serviceDebug section to your behavior like this:
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
You can turn on tracing like this:
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Error,ActivityTracing" propagateActivity="true">
<listeners>
<add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="LFFServicesHost.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>
Then open the LFFServicesHost.svclog file. This will show detailed information as to what failed.
Upvotes: 2
Reputation: 67326
The is just a generic error that WCF sends back for any fault on the server. As the error message explains, if you want to see the actual error you need to turn on the IncludeExceptionDetailInFaults
in your server config. This setting looks like this:
<behaviors>
<serviceBehaviors>
<behavior name="My.ServiceBehaviour">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
Then, WCF will return you the actual error.
Upvotes: 3