I did not get any response from remoting newsgroup. So, I am posting here to
see if anyone has an answer. Sorry for the cross-post.- Prodip

I am sure many of you have encountered similar problem when you try to pass
an OleDbParameter object from client to Remote Service. You will get a nice
message saying - Because of security restrictions, the type
System.Runtime.Remoting.ObjRef cannot be accessed.

This has to do with the Serialization of the OleDbParameter object. When the
Remote client try to make the call to Service method, it fails. How do we
fix this?

Microsoft has some documentation on ObjRef and Remoting -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh21.asp

In the above article it says-
If the object passed as a parameter derives from System.MarshalByRefObject,
it is passed by reference. In this case, the object requires a URL to
support call backs to the client. It is possible for the client URL to be
spoofed, which can result in a call back to an alternate computer.

Well, OleDbParameter meets this criteria because it implements
MarshalByRefObject. I did not quite understand about the URL part. I will
appreciate any help you can offer.

Client config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="test">
<channels>
<channel ref="tcp" port="0" useDefaultCredentials="true">
<channelSinkProviders>
<clientProviders>
<formatter ref="soap" />
<formatter ref="binary" ></formatter>
</clientProviders>
<serverProviders>
<formatter ref="soap" typeFilterLevel="Full" />
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channelSinkProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>

Thanks,
Prodip
www.aspnet4you.com