C# Web Service

  • Thread starter Thread starter Kiran A K
  • Start date Start date
K

Kiran A K

Hi,

When I try to return an object of type
"System.Diagnostics.PerformanceCounter" from a web method (written in
C#) i got the following error:
Cannot serialize member System.ComponentModel.Component.Site of type
System.ComponentModel.ISite.

The above web service example is given in a tutorial.

What is the solution to this serialization problem?

Regards,
Kiran
 
Quite a strange idea for a tutorial - passing a perf counter through
SOAP. Perf counter is bound to underlying Win32 perfcounter handle, and
because of this cannot be serialized and moved to another computer. It
only could be made remotely accessible (for example by creating a
IMarshalByRefObject-derived wrapper for it).
 
Back
Top