SharePoint List Destination: System.InvalidCastException: Unable to cast object of type 'System.Data.SqlClient.SqlConnection

Nov 26, 2012 at 10:35 AM

Hi everybody

I updated my existing SharePoint List Source/Destination projects to the newest release. When I want to choose/change the Connection within the SharePoint List Destination I get the following error:

[SharePoint List Destination [55]: System.InvalidCastException: Unable to cast object of type 'System.Data.SqlClient.SqlConnection' to type 'System.Net.NetworkCredential'. Instances of type that represent COM components cannot be cast to types that do not represent COM components; however thay can be cast to interfaces as long as the underlying COM component supports QueryInterface call for the IID of the interface.
at Microsoft.Samples.SqlServer.SSIS.SharePointListadapters.SharePointListDestination.Acquireconnections(Object transaction)

I tried different connection types ADO, OLEDB with Windows Authentication and SQL Login, but nothing helps. I saw that someone other had the same problem. But there is no solution mentioned...

It would be great if some can help me.

Thanks in advance.

Thomas

Nov 29, 2012 at 6:20 AM

Hi All ,

I am getting the error while creating the new data flow task to the existing one.

[SharePoint List Destination [55]: System.InvalidCastException: Unable to cast object of type 'System_ComObject' to type 'System.Net.NetworkCredential'. Instances of type that represent COM components cannot be cast to types that do not represent COM components; however thay can be cast to interfaces as long as the underlying COM component supports QueryInterface call for the IID of the interface.
at Microsoft.Samples.SqlServer.SSIS.SharePointListadapters.SharePointListDestination.Acquireconnections(Object transaction)

I tried all the posiblity not able to find any answer Please help it is urgent.

Dec 3, 2012 at 8:37 AM

Hi all,

Still have this problem. Can nobobody help here? Can I not use this functionality anymore?

Any help is appreciated!

Regards,

Thomas

 

 

 

Dec 5, 2012 at 7:43 PM

To get around this error I created a new connection manager of the SPCRED type and then used that.  Hopefully that does it for you.

Dec 6, 2012 at 7:53 AM

Hi

Thanks for your feedback. That was the problem, in the meantime I found the problem also. I was not aware about this new functionality (SharePoint Connection Manager) and didn't realise that this connection has nothing to do with a database. Like the name itself says it is a SharePoint Connection...

Regards, Thomas

 

Jan 23, 2013 at 2:00 PM

Sorry for the vague error message, sometimes SSIS Has a weird way of throwing errors. SP Connection manager was a feature request added, and unfortunately, was breaking to add it in.   I think I might be able to trap that error better, I see it let you just tack any connection manager to the adapter which is what caused your issue.

Jan 23, 2013 at 2:01 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.