Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

Serialization Woes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oldman - 10 Apr 2007 20:28 GMT
I have a type that is serializable that is located in an assembly that is
loaded dynamically from a special directory.  When deserializing this object
the framework fails to find the type.

Now, I am aware of the SerializationBinder class and how it can be used to
get around this problem however that only works when you are dealing with the
formatters yourself and have the ability to set the binder class.  In my
case, I have an object that needs to go on the Clipboard.
The problem is that it isn't being handled correctly.  How do I deal with
this case?

Thanks.
Pete - 10 Apr 2007 20:35 GMT
I could be completely off-base here, because I've never had to do this for
serialization, but you might want to look into creating an
AppDomain.TypeResolve event handler to resolve the type.

I've never used TypeResolve, but I have used ResourceResolve and
AssemblyResolve and it sounds like it might fit the bill for you.

Pete

>I have a type that is serializable that is located in an assembly that is
> loaded dynamically from a special directory.  When deserializing this
[quoted text clipped - 10 lines]
>
> Thanks.
Oldman - 10 Apr 2007 20:46 GMT
Thanks!  I will look into that.

> I could be completely off-base here, because I've never had to do this for
> serialization, but you might want to look into creating an
[quoted text clipped - 19 lines]
> >
> > Thanks.
Oldman - 10 Apr 2007 21:34 GMT
This didn't work.  In fact it never fired.  However, I know the problem has
something to do with it being in the dynamically loaded assembly because when
I move the definition out into the main executable it works appropriately.

Any other suggestions?

> I could be completely off-base here, because I've never had to do this for
> serialization, but you might want to look into creating an
[quoted text clipped - 19 lines]
> >
> > Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.