C# Web Service

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
 
N

nightwatch77

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top