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.
I am using SMO within c#.NET to build a SMO transfer object and then execute it to transfer data between various SQL instances...Think Import/Export wizard with some error handling ;) using Microsoft.SqlServer.Management.Smo; using Microsoft.SqlServer.Management.Common; If i run in debug mode the application runs fine. As soon as I publish and run it on the same machine, same user I get the following error as soon as the transfer is attempted 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. Having watched the package it's ouput in DEBUG mode I can see it creating temporary xml files (TransferMetadata491574513.xml) with the various SQL scripts and a temporary DTSX file in "C:\Documents and Settings\MYUSER\Local Settings\Application Data\Microsoft\SQL Server\Smo" , these do not get created using the published version. If i run the exe in the DEBUG or RELEASE folder it also works fine. The only issue is when i Publish the application. Any suggestions? I have checked the two MSDN articles http://support.microsoft.com/?id=918038 and http://support.microsoft.com/?id=913817, neither are relevant as I do not have a DTS package, i am creating one programitcally. I have however ran the registry permissions check and that came back clean. SQL Server 2008 Enterprise used throughout. Thanks MCDBA, MCAD, MCITP, MCTS
September 21st, 2010 7:55am

what is your source? what is your destiantion? tell us more about your package ( if package is not available put code here)http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
September 21st, 2010 8:01am

Transfer l_obj_transfer = new Transfer(l_db_source); l_obj_transfer.CopySchema = l_boo_refreshschema; l_obj_transfer.CopyData = true; l_obj_transfer.CopyAllObjects = false; //set this to false as we will populate it as we know which ones we need l_obj_transfer.Options.WithDependencies = false; //set the transfer credentials for the destination l_obj_transfer.DestinationDatabase = l_db_dest.Name; l_obj_transfer.DestinationServer = l_srv_dest.Name; l_obj_transfer.DestinationLogin = l_con_dest.Login; l_obj_transfer.DestinationPassword = l_con_dest.Password; l_obj_transfer.DestinationLoginSecure = l_con_dest.LoginSecure; l_obj_transfer.DropDestinationObjectsFirst = false; //allow the output to be grabbed l_obj_transfer.DataTransferEvent += new DataTransferEventHandler(vd_transfer_progress); //then i do some checks that the tables exist etc and they have data and any forgeign keys i_obj_transfer.TransferData(); --<<--<<--this is the line that fails THERE IS NO PACKAGE :) This is using the SMO objects Source and Destination are two SQL servers with identical schemas, I give the user the choice of tables to import and then import that data taking into account foreign keys and integrity etc (something the default import/export does not handle well) As above running the package from visual studio in debug mode or running it from the bin project folder the application works fine. Running it as a published app falls over at the transferData() command with the above errors regarding loadxml C:\Documents and Settings\USER\Local Settings\Application Data\Microsoft\SQL Server\Smo\ remains empty which i guess is why it can not load the xml...but in any other mode I see the files get created as required in here. MCDBA, MCAD, MCITP, MCTS
September 21st, 2010 8:21am

I have the same problem. When I publish the project and include the dll's to the publish I get the same error. To bypass this I copy the dlls to a folder in bin\debug. Then delete and re-add the references to the project. And distribute the app without publishing ( together with the folder with dlls ). This is probably a Visual Studio 2008 Bug.
Free Windows Admin Tool Kit Click here and download it now
March 17th, 2011 10:17am

Anyone with a proper answer?
March 28th, 2011 11:41am

I had this same error yesterday when trying to run a package on our server. Works ok on my laptop but not on the server. My package uses custom delveoped connection manager and pipeline component. To resolve my error(s), I copied my .dll files across to the relevant component folders on the server. Then I installed the .dll's into the Global Assembly Cache. Once I have completed this I have been able to open the package on the server within BIDS and also add the package to be stored within MSDB database. HTH's Michael
Free Windows Admin Tool Kit Click here and download it now
March 28th, 2011 12:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics