using wcf service exposed by Biztalk RRS feed

  • Question

  • hi,

    i try to use a wcf service that i exposed from a biztalk orchestration 

    the orchestration extraxt data from sql server 

    i have referenced my service  in a console application 

    i don t know how to use it to extract data from sql server 

    i tryed with this code 


    class Program


            private static dataconsumeType[][] docrootelem;

            static void Main(string[] args)


                BiztalkService.WcfService_EXPOSESQLDATAClient Client = null;

                Client = new WcfService_EXPOSESQLDATAClient();





    and i have this exception 

    An exception has been thrown by the type initializer for 'System.ServiceModel.Diagnostics.TraceUtility'.

    {"Failed to initialize the system configuration"}

    any idea please



    Friday, October 28, 2011 9:29 AM


All replies

  • Summary of WCF service description
    <?xml version="1.0" encoding="utf-16"?>
    <WcfServiceDescription xmlns:xsi="" xmlns:xsd="" Name="EXPOSESQLDATA" Description="BizTalk assembly &quot;EXPOSESQLDATA, Version=, Culture=neutral, PublicKeyToken=f6d3344d8c429794&quot; published WCF service." TargetNamespace="" xmlns="">
      <LocationSettings Location="http://localhost/EXPOSESQLDATA" Overwrite="false" AuthAnonymous="true" />
      <ApplicationSettings CreateReceiveLocations="true" ApplicationName="EXPOSESQLDATA" />
      <AdapterSettings AdapterName="WCF-BasicHttp" />
      <MetadataSettings EnableMetadata="true" MetadataOnly="false" ReceiveLocationName="" />
        <WcfService Name="WcfService_EXPOSESQLDATA" Description="service &quot;*&quot; port &quot;*&quot;">
            <WcfOperation Name="procedure" Description="operation &quot;procedure&quot;" Flow="OneWay">
                <WcfMessage Name="__messagetype_EXPOSESQLDATA_SQLService" Description="EXPOSESQLDATA.__messagetype_EXPOSESQLDATA_SQLService, EXPOSESQLDATA, Version=, Culture=neutral, PublicKeyToken=f6d3344d8c429794" Direction="Input">
                  <WcfMessageType Category="XsdType" TypeName="EXPOSESQLDATA.SQLService" AssemblyName="EXPOSESQLDATA, Version=, Culture=neutral, PublicKeyToken=f6d3344d8c429794" AssemblyLocation="C:\Windows\Microsoft.Net\assembly\GAC_MSIL\EXPOSESQLDATA\v4.0_1.0.0.0__f6d3344d8c429794\EXPOSESQLDATA.dll" TargetNamespace="http://mysqlreceive" RootName="docrootelem" IsAnyType="false" IsEnvelope="false" />
    Friday, October 28, 2011 9:30 AM
  • Does your console application have a configuration file? (called App.Config). In this file various WCF configurations should be appended. This should happen automatically if you have made a service reference inside Visual Studio. It sounds to me that there is some mis-configuration concerning trace inside App.Config. Could you show the content here?


    Morten la Cour

    Friday, October 28, 2011 10:11 AM
  • Check this thread from the WCF forums for a possible cause and resolution. HTH
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    Mark As Answer or Vote As Helpful if this helps.
    Friday, October 28, 2011 10:24 AM