Problem with ASP.NET 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
 
post code.

In general, if you get this error, you need to see if you can either make
the result type serializable, or return a different type. It should be
simple enough to extract the data you need from the performance counter into
a local class that you define, and return that type.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 

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

Back
Top