none
Custom Connection Manager only works in 32bit- 0xC0011008: Error loading from XML

    Question

  • I have a very basic / stripped connection manager with only one property (SSIS 2012). It works fine in design time (you can open the connection manager editor and change the value), but in runtime it only works in 32bit mode. The runtime-validate-method does work, but if everything validates OK then in 64bit it throws an error when you run the package:

    The package failed to load due to error 0xC0011008 'Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.'. This occurs when CPackage::LoadFromXML fails.

    Exception deserializing the package "The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails.

    The 2 VS projects are .Net 4 class library projects with the Build Platform on "Any CPU"
    .Net 4 / All CPU

    I only add references to:
    Microsoft.SqlServer.ManagedDTS - C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ManagedDTS.dll

    Microsoft.SqlServer.Dts.Design - C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.Dts.Design\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Dts.Design.dll

    Compiled DLL's are available in GAC and SQL Server connections folder:

    I made the sourcecode available via codeplex:
    https://ssisconnectionmanager.codeplex.com/SourceControl/latest#myFirstConnectionManager/2012/myFirstConnectionManager/myFirstConnectionManager.cs


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter


    Sunday, October 06, 2013 12:03 PM
    Moderator

Answers

  • Found the solution... but not sure why.

    Besides deploying to the GAC and to C:\Program Files(x86)\Microsoft SQL Server\110\DTS\Connections\ I also deployed it to the 64bit folder C:\Program Files\Microsoft SQL Server\110\DTS\Connections\ and now it works...

    This isn't the case for tasks, transformations and enumerators... they work on both 32bit and 64bit machines if you only deploy it to the x86 folder (apparently because visual studio is 32bit).

    Any good/detailed (msdn) documentation on this subject?


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, October 07, 2013 9:31 PM
    Moderator

All replies

  • AppPrincipal (identity) related? Hint http://serverfault.com/questions/339747/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml

    Arthur My Blog

    Monday, October 07, 2013 2:10 PM
    Moderator
  • AppPrincipal (identity) related? Hint http://serverfault.com/questions/339747/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml

    Arthur My Blog

    Hi Arthur,

    Looks like something similar (same message, same 64bit issue), will try that tomorrow! But sounds weird that you should tell SSIS which identity to use...

    Found the same thread in MSDN: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/47d185d3-c801-45cf-becd-3c2524d98353/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml?forum=sqlintegrationservices


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, October 07, 2013 3:01 PM
    Moderator
  • Hi Arthur,

    His solution was to remove Thread.CurrentPrincipal from the code... but unfortunately I'm not using that...


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, October 07, 2013 7:39 PM
    Moderator
  • I recreated the solution for SSIS 2008 and also got an error when running in 64bit:


    Exception deserializing the package "The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.
    ". (Microsoft Visual Studio)

    This time it is 0xC0010014 instead of 0xC0011008


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, October 07, 2013 7:41 PM
    Moderator
  • Found the solution... but not sure why.

    Besides deploying to the GAC and to C:\Program Files(x86)\Microsoft SQL Server\110\DTS\Connections\ I also deployed it to the 64bit folder C:\Program Files\Microsoft SQL Server\110\DTS\Connections\ and now it works...

    This isn't the case for tasks, transformations and enumerators... they work on both 32bit and 64bit machines if you only deploy it to the x86 folder (apparently because visual studio is 32bit).

    Any good/detailed (msdn) documentation on this subject?


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, October 07, 2013 9:31 PM
    Moderator
  • Hi SSISJoost,

    Nope I do not see this being the case, e.g. BOL does not state so, the 32 bit directory only specified.

    Do you mind adding a community feedback to its page? Or I can do that referencing you.


    Arthur My Blog

    Tuesday, October 08, 2013 2:31 PM
    Moderator
  • Thanks Arthur, I have added feedback requesting more info about the 32bit and 64bit folder. Will do some more research/testing/googling and add my feedback here and in the "Community Additions".

    The annoying part is that some bloggers say you only need the x86 folder because visual studio is 32bit and others deploy the dll's to both folder. Can't hurt deploying them to both folders, but I want to be sure...


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Tuesday, October 08, 2013 3:55 PM
    Moderator
  • You are welcome Joost, and thank you,

    I think under the regular deployment scenario there is a way to request to deploy an assembly to the appropriate place or even done behind the scenes (target any CPU) the 64 bit processes finds it then is so, but given how we create custom components for SSIS we may need an extra deployment tick.

    I think many bloggers did not test the deployment to both environments, so your feedback would be very valuable.


    Arthur My Blog

    Tuesday, October 08, 2013 5:55 PM
    Moderator
  • Just in case anyone encounter this 0xC0011008 error and have my same problem. My problem was that I have the custom task register twice in the GAC. I just removed both, and re-register once. Reboot for kicks and voila, it worked.
    Thursday, March 06, 2014 5:49 PM