Remoting problem from C# shell namespace extension dll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using business objects that are built on top of Rockford Lhotka's CSLA
Business Object framework.

I have a simple windows application that uses the objects configured for
remoting and the app logs on without any problems.

I have now created a Windows Shell Namespace Extensions application in C#
using the Renameable example from http://www.codeplex.com/namespaceextension
(recently moved from
http://www.gotdotnet.com/Community/...mpleGuid=08ccce00-b2ba-4bee-9c29-a18f3ad85a65).

When I try to call my remote objects to login from this dll, I get a
remoting error:

"The Type System.Xml.XmlDocument in Assembly System.Xml, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as
serializable."

My understanding is that my dll will be running in windows' Explorer.exe
process. Can anybody help me to find out if this is what is causing the
problem and if so how I can get around it?

Even just helping me to find a way of debugging the dll would be useful (I
currently need to build the application then click on the icon that appears
in the Other section of My Computer to run the compiled version and see my
changes running).
 
"The Type System.Xml.XmlDocument in Assembly System.Xml,
Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as
serializable."

Old Rocky's base objects use the Serializable Attribute, which means any
object derived from a CSLA framework objects must be Serializable as well.

System.Xml.XmlDocument is not a Serializable class from what I understand,
so you're going to have trouble.

You might be able to serialize the System.Xml.XmlDocument to be passed in a
serialized object derived from the CSLA framework.

http://www.geekzilla.co.uk/View42D9A6D3-5422-4E01-8470-D01DEF1F4770.htm

Of course you'll have to deserialize it on the other end.

You can get Rocky's email address at his Web site and post to him. I sent
emails to him with issues concerning the CSLA framework, and he promptly
replied with solutions.
 
Thanks for the response,

The thing is, the remoting all works when I call my login method from my
winforms exe.

I copied the code and references etc from this project to my namespace
extensions dll and I get that error, so it is not obvious what I need to
change.

I wondered if it was down to something in Windows' Explorer.exe process,
which I believe is where my dll is running in.

I might try Rocky actually, could be a good call.

If you or anybody else can think of anything that might be causing this
difference in behaviour in code running in a winforms exe and code running in
a shell extensions dll then I would be really grateful.
 
Back
Top