all groups > dotnet component services > september 2003 >
You're in the

dotnet component services

group:

Serialization


Re: Serialization Tomas Restrepo (MVP)
9/7/2003 6:45:38 PM
dotnet component services:
Jonas,

[quoted text, click to view]

Do you have delegations.biz in the GAC?
--
Tomas Restrepo
tomasr@mvps.org

Serialization Jonas
9/7/2003 11:33:31 PM
Hi!

I have a class running in COM+ in a library package, and it works great. But
when I change it to a server package, I get this message:

System.Runtime.Serialization.SerializationException: The type
se.cybercom.cybermate.cs.Delegations.Biz.DlgsTx+Regional in Assembly
delegations.biz, Version=1.0.1343.14260, Culture=neutral,
PublicKeyToken=69760308791fe826 is not marked as serializable.

"Regional" is defined as follows and is used to send an array between the
client (web page) and the server in the COM+ package:

Public Structure Regional
Public guidRegionalID As Guid
Public guidLanguageID As Guid
Public strName As String
Public strDescription As String
Public dtModifyTime As DateTime
End Structure

I tried to mark it with the <Serializable> attribute, but then I get the
following error instead:

System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.Runtime.Serialization.SerializationException: Cannot find the
assembly delegations.biz,

What more do I have to do to get this to work?

TIA

Jonas




Re: Serialization Tomas Restrepo (MVP)
9/8/2003 6:08:09 AM
Hi Jonas,

[quoted text, click to view]

Humm... interesting. Have you tried not making Regional a nested type? If
not, try converting it to a class, also, as there have been some bugs
reported with serialization of structs
--
Tomas Restrepo
tomasr@mvps.org

Re: Serialization Jonas
9/8/2003 7:58:14 AM
Hi Tomas!

No, none of the dll's that make up the delegations.biz namespace is in the
GAC, do I have to put them all there for this to work?

Brgds


[quoted text, click to view]

Re: Serialization Jonas
9/8/2003 8:39:41 AM
Sorry, the delegations.biz is of course only one dll. But when I put it in
the GAC, I get this error instead

Type is not resolved for member
se.cybercom.cybermate.cs.Delegations.Biz.DlgsTx+Regional

/Jonas

[quoted text, click to view]

Re: Serialization Jonas
9/18/2003 9:37:16 AM
I solved by reverting to plain old arrays :-< but I will try to use a class
the next time. The reason for choosing the struct was that it was more
light-weight than a ordinary class, but if a struct doesn't serialize well,
it doesn't work anyway.

Thanks for your help

Jonas

[quoted text, click to view]

AddThis Social Bookmark Button