1
votes

From my Library project, I'm making a call to a WCF service, which returns the following error message. The strange thing is that the service does not create any log for this request.

*Server stack trace:

at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at MLibrary.ValidationService.IValidation.DetectEx(Data data) at MLibrary.ValidationService.ValidationClient.DetectEx(Data data) at MLibrary.Validator.Change(Int32 duration, List`1 params)*

1
Did you try WCF tracing yet ?<configuration> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\log\Traces.svclog" /> </listeners> </source> </sources> </system.diagnostics> </configuration>Kaushik Srinath
Yes, after doing that i got Server stack trace partNikhil Dinesh

1 Answers

0
votes

In web.config added below lines of code. Which will enable server stack trace and we can find the root cause of the issue.

<configuration> 
<system.diagnostics> 
    <sources> 
            <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
            <listeners>
            <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\log\Traces.svclog" />
            </listeners> 
        </source> 
    </sources>
</system.diagnostics>