Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6118639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:27:36+00:00 2026-05-23T15:27:36+00:00

I cant figure out whats wrong with my config code below, when I include

  • 0

I cant figure out whats wrong with my config code below, when I include the NServiceBus config info I get the followng error:

The Type Initializer for ‘System.ServiceModel.Diagnostics.TraceUtility’ threw an exception’

The message goes away when I comment out the NServiceBus code so its not related to a faulted instal of the .net framework like some of the interwebs suggested.

Any ideas would be appreciated!

The error is caused when my code gets to the constructor for WebClient belowfollowing point:

WEBCallback = new CFPWebImplementation();
WEBContext = new InstanceContext(WEBCallback);
WEBClient = new TradeOperationsClient(WEBContext);

and my config file:

<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding_ITradeOperations" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
            hostNameComparisonMode="StrongWildcard" listenBacklog="10"
            maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
            maxReceivedMessageSize="65536">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <client>
      <endpoint address="net.tcp://localhost:8687/TradePortal/Operations/"
          binding="netTcpBinding" bindingConfiguration="NetTcpBinding_ITradeOperations"
          contract="CFP_Web.ITradeOperations" name="NetTcpBinding_ITradeOperations" />
    </client>
  </system.serviceModel>



  <configSections>
    <section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core"/>
    <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core"/>
  </configSections>
  <MsmqTransportConfig InputQueue="HammersmithInputQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5"/>

  <UnicastBusConfig>
    <MessageEndpointMappings>
      <add Messages="Messages" Endpoint="BBRGInputQueue"/>
    </MessageEndpointMappings>
  </UnicastBusConfig>
   <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:27:36+00:00Added an answer on May 23, 2026 at 3:27 pm

    Turns out the answer was that the needs to be the first element in the app.config file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi here is my code, I cant figure out whats wrong ? <?PHP $my_connection
I cant figure out whats wrong. Its working when i tried to refresh only
Query issues, for the life of me i cant figure out what is wrong
Ok, this is bugging me, and I just can't figure out what is wrong...
I can't seem to figure out what I am doing wrong here. I publish
I realize this perhaps a naive question but still I cant figure out how
i am trying to set the htmlAttribute property but i cant figure out the
I'm building a questionnaire mvc webapp, and i cant figure out how to pass
This code worked in Sqlite which i have more experience with. I cant figure
I'm trying to use CAGradientLayer and getting an unhelpful compile error. Can't figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.