Configured MSE brokered service to output service debug info

Aug 13, 2008 at 5:28 PM
When my client talks to my WCF service directly, every thing works fine. When I used MSE (configured as broker and messanger and installed on one machine with database on different machine), it worked fine for one day and failed next day (for whatever reason) with following exception:

Error: System.ServiceModel.FaultException: 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 t he 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.

It is obvious that MSE is using WCF underneath. My question is how can I configure MSE to spit out the debug information? For example, if my direct WCF service is causing above exception, then I would do what is explained in the exception above. How can I configure MSE to do the same for my brokered service?

Thanks.
Developer
Aug 13, 2008 at 6:22 PM
Please check if you have folder named "c:\temp\logs". If not then create one. That's where Runitme and Service Catalog writes the log information by default. You can chnage the log location by updating the respective configuration files. You will have to restart the services once you update the config files. Look at the System.Diagnostics section in each config file:

<

system.diagnostics>

 

...

<sharedListeners>

 

<

add initializeData="c:\temp\logs\mse_catalog.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="xml"/>

 

<

add initializeData="c:\temp\logs\mse_catalog.txt" type="System.Diagnostics.TextWriterTraceListener" name="txt"/>

 

</

sharedListeners>

 

...

 

</

system.diagnostics>

 

Developer
Aug 13, 2008 at 7:03 PM
And to answer the question about allowing debug information to flow from an MSE service to the consumer (obviously not for production use), you can apply a policy that turns on this behavior.

<PolicyModel xmlns="http://microsoft.com/mse/2007/runtime/policyModel" xmlns:mse="http://services.microsoft.com/MSE" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wcf="clr-namespace:System.ServiceModel.Configuration;assembly=System.ServiceModel">
  <wcf:ServiceDebugElement IncludeExceptionDetailInFaults="true" >
  </wcf:ServiceDebugElement>
</PolicyModel>