Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Trace error: Configuration evaluation context not found

Tags:

.net

wcf

I've set up a self-hosted service scenario where I'm programmatically setting up several service hosts. For each one of these hosts that I open, I see the following error in the trace log:

<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Warning">
    <TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.EvaluationContextNotFound.aspx</TraceIdentifier>
    <Description>Configuration evaluation context not found.</Description>
    <AppDomain>myprogram.exe</AppDomain>
</TraceRecord>

I've read that this is caused by using extensions that are not declared in the configuration file, and I am indeed using a custom behavior extension, but adding it to the .exe's configuration file did not have any effect:

<system.serviceModel>
    <extensions>
        <behaviorExtensions>
            <add name="myext" type="mytype, myassembly" />
        </behaviorExtensions>
    </extensions>
    ....
</system.serviceModel>

Note that I'm not using this extension anywhere else in the configuration file, I'm adding it to the service host programmatically. I even set up a dummy behavior that used the extension just to see if it would resolve the issue, but it did not.

Why am I seeing this error in my log?

like image 808
Mark Avatar asked Nov 18 '10 22:11

Mark


1 Answers

I had this issue and found that I had multiple identicle custom bindings in the ServiceReferences.clientconfig file. I simply commented out the extras and all was good. (I am using Silverlight to call WCF services)

 <customBinding>
    <binding name="SecureTransportNoCredentialsEndpoint">
      <binaryMessageEncoding />
      <httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>
    <!--<binding name="SecureTransportNoCredentialsEndpoint1">
      <binaryMessageEncoding />
      <httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>
    <binding name="SecureTransportNoCredentialsEndpoint2">
      <binaryMessageEncoding />
      <httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>
    <binding name="SecureTransportNoCredentialsEndpoint11">
      <binaryMessageEncoding />
      <httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>
    <binding name="SecureTransportNoCredentialsEndpoint3">
      <binaryMessageEncoding />
      <httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>
    <binding name="SecureTransportNoCredentialsEndpoint12">
      <binaryMessageEncoding />
      <httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>-->
  </customBinding>
</bindings>
like image 56
Phil Newell Avatar answered Sep 22 '22 07:09

Phil Newell