Groups | Blog | Home
all groups > dotnet component services > may 2004 >

dotnet component services : Error when trying to return a array from a COM+ Object


Bill Smith
5/11/2004 5:10:37 PM
I have written a COM+ DLL in vb.net to return all the user samaccount name
in a given OU. The results are returned as a dataview.
As the ASP.NET page calls the function from the COM+ it fails with the
following error:

The type System.Data.DataView in Assembly System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as
serializable.

I tried just returning one name as a string and it worked fine. So is there
something I should be doing to return Arraylists and datasets??

Thanks

Bill

SqlRanger
5/12/2004 8:51:21 AM
You can't return a dataview from a serviced component in a COM+ server
application because datatviews are not serializable. If the component were
in a library application you could return a dataview because library
applications load in the same proccess as the client and so don't need to be
serialized. I suggest you return a dataset or an array.

--

Regards from Madrid (Spain):

Jesús López
MVP Microsoft .NET

"No darás tropezón ni desatino que no te haga adelantar camino"

AddThis Social Bookmark Button