The type initializer for 'DacIEServiceCli.DataCenterMapper' threw an exception.

Sep 13, 2011 at 8:30 AM

I got this error.

Microsoft (R) SQL DAC Import Export Service Sample version 1.2.0.0
Copyright (C) Microsoft Corporation. All rights reserved.

An error has occurred:

The type initializer for 'DacIEServiceCli.DataCenterMapper' threw an exception.
An error occurred creating the configuration section handler for DataCenterMappi
ng: Request failed. (C:\Users\Antti Makkonen\Desktop\daciesvccli\DacIESvcCli.exe
.Config line 25)

Request failed.

If someone has a idea what I am doing wrong, I would greatly appreciate the help.

Thanks,

Antti Makkonen

 

Sep 13, 2011 at 5:41 PM

The configuration section in the config file may be corrupt.

DacIESvcCli.exe.config (sits in the same folder alongside with DacIESvcCli.exe) file should look like below:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="DataCenterMapping" type="DacIEServiceCli.DataCenterMappingSection, DacIESvcCli"/>
  </configSections>
  <system.serviceModel>
    <client>
      <endpoint address="http://dacdc.cloudapp.net/DACWebService.svc"
      binding="wsHttpBinding"
      bindingConfiguration="SecureConfig"
      contract="IEService.WebServices"
      name="IEServiceEndpoint"/>
    </client>
    <bindings>
      <wsHttpBinding>
        <binding name="SecureConfig">
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="Certificate" algorithmSuite="Default" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
  </system.serviceModel>
  <DataCenterMapping>
    <DataCenters>
      <add dns="CH1-1" name="North Central US" endpoint="https://ch1prod-dacsvc.azure.com/DACWebService.svc"/>
      <add dns="SN1-1" name="South Central US" endpoint="https://sn1prod-dacsvc.azure.com/DACWebService.svc"/>
      <add dns="DB3-1" name="North Europe" endpoint="https://db3prod-dacsvc.azure.com/DACWebService.svc"/>
      <add dns="AM2-1" name="West Europe" endpoint="https://am1prod-dacsvc.azure.com/DACWebService.svc"/>
      <add dns="HKN1-1" name="East Asia" endpoint="https://hkgprod-dacsvc.azure.com/DACWebService.svc"/>
      <add dns="SGP1-1" name="Southeast Asia" endpoint="https://sg1prod-dacsvc.azure.com/DACWebService.svc"/>
    </DataCenters>
  </DataCenterMapping>
</configuration>

Do you see anything different in your file?

Sep 13, 2011 at 7:00 PM

http://sqldacexamples.codeplex.com/discussions/271176

See that item for instructions.  Most likely your EXE is blocked from downloading.

Sep 14, 2011 at 6:47 AM

Thanks, this did the trick.

After I unblocked exe and config file things starte to work.