I have remote object that writes a DataSet to an ASP.NET host application.
The remote object used a class to do the writing. With the permissions set
properly everything worked fine until I decided to make this class a
serviced component to take advantage of some COM+ features. Now I get a
runtime error in the method used to write the DataSet. The same method was
performing the task successfully prior to making the class a COM+ component.
Here is what the method of the serviced component does:
public bool PersistData(DataSet ds, string filePath)
{
//...
ds.WriteXml(filePath, XmlWriteMode.WriteSchema);
//...
}
and here is the output:
[top of Call Stack]
mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy::HandleReturnMessage(
System.Runtime.Remoting.Messaging.IMessage reqMsg =
{System.Runtime.Remoting.Messaging.Message},
System.Runtime.Remoting.Messaging.IMessage retMsg =
{System.Runtime.Remoting.Messaging.MethodResponse}) + 0x90 bytes
[Output]
An unhandled exception of type 'System.Runtime.Remoting.RemotingException'
occurred in mscorlib.dll
Additional information: The argument type System.Data.DataSet cannot be
converted into parameter type System.Data.DataSet.
Any idea on what the problem could be?
TIA
Jos? Miguel Torres - 29 Sep 2004 14:28 GMT
Try to put method serializable....
regards
--
Jos? Miguel Torres
jtorres_diaz~~ARROBA~~terra.es
http://jmtorres.blogspot.com
> I have remote object that writes a DataSet to an ASP.NET host application.
> The remote object used a class to do the writing. With the permissions set
[quoted text clipped - 20 lines]
>
> [top of Call Stack]
mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy::HandleReturnMessage(
> System.Runtime.Remoting.Messaging.IMessage reqMsg =
> {System.Runtime.Remoting.Messaging.Message},
[quoted text clipped - 12 lines]
>
> TIA