Incomplete WCF Log file in a silverlight RIA services Application

116 Views Asked by At

I have a silverlight + RIA Services application. Its running ok in my development environment. But in production, i get the error bellow when calling any method in RIA Services to get some entities. The command I'm executing is :

context.Load<MyEntity>(context.GetMyEntityQuery(), LoadBehavior.RefreshCurrent,
   lo => { 
       ... Get the results ...
   });

I'm getting this error:

Load operation failed for query 'GetItemGradeCurricularPorSerie'. 
[HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging Resource strings are unavailable. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.40416.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer

Whenever I have a "NotFound" error in my development environment, I setup WCF to log its operation in logfiles, and it the log files i can find the detailed information about the error. So i did that with the following configuration:

<system.diagnostics>
    <sources>
        <source propagateActivity="true" name="System.ServiceModel" switchValue="Warning, ActivityTracing">
            <listeners>
                <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                    <filter type="" />
                </add>
                <add initializeData=".\logs\MyApp.Traces.svclog"
                    type="System.Diagnostics.XmlWriterTraceListener" name="traceListener">
                    <filter type="" />
                </add>
            </listeners>
        </source>
        <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">
            <listeners>
                <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                    <filter type="" />
                </add>
                <add name="ServiceModelMessageLoggingListener">
                    <filter type="" />
                </add>
            </listeners>
        </source>
    </sources>
   <sharedListeners>
        <add initializeData=".\logs\MyApp_tracelog.svclog"
            type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
            <filter type="" />
        </add>
        <add initializeData=".\logs\MyApp_messages.svclog"
            type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
            <filter type="" />
        </add>
    </sharedListeners>
    <trace autoflush="true" indentsize="4" />
</system.diagnostics>
(...)
<system.serviceModel>
    <diagnostics performanceCounters="Off">
        <messageLogging logEntireMessage="true" logKnownPii="true" logMalformedMessages="true"
            logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true"
            maxSizeOfMessageToLog="2000000000" />
        <endToEndTracing propagateActivity="true" activityTracing="true"
            messageFlowTracing="true" />
    </diagnostics>
(...)
</system.serviceModel>

With the configuration above, in the development machine, I get a MyApp.Traces.svlog and MyApp_messages.svlog. And in one of this files i find the real error message. But, when i tried to do that in the production server, i get only MyApp.Traces.svlog, and its incomplete:

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>0</EventID>
        <Type>3</Type>
        <SubType Name="Transfer">0</SubType>
        <Level>255</Level>
        <TimeCreated SystemTime="2017-06-22T21:30:11.6757512Z" />
        <Source Name="System.ServiceModel" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" RelatedActivityID="{96fc137e-346c-45de-80d0-34b59e461607}" />
        <Execution ProcessName="        
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>131085</EventID>
        <Type>3</Type>
        <SubType Name="Start">0</SubType>
        <Level>255</Level>
        <TimeCreated SystemTime="2017-06-22T21:30:11.7069040Z" />
        <Source Name="System.ServiceModel" />
        <Correlation ActivityID="{96fc137e-346c-45de-80d0-34b59e461607}" />
        <Execution ProcessName="

The Xml elements stops on line <Execution ProcessName=".

So after all that, my question is: Why the log file is not complete? What could be causing this?

By the way, the server doesn't accept full trust assemblies, I don't know if its related.

If someone has some tip abou the error itself I'll be thankfull too, but the focus is on getting the right error message, so it would help in future errors too.

0

There are 0 best solutions below