"WG" <WG@discussions.microsoft.comwrote in message
news:6E**********************************@microsof t.com...
"John Saunders [MVP]" wrote:
>"WG" <WG@discussions.microsoft.comwrote in message
news:37**********************************@microso ft.com...
Hi I have a web service that returns a custom class (i.e. not a builtin
like
a string or int etc). This class has properties that are also custom
classes. What is happening is if any of these properties are set to
null
(which is a legimate scenario in this case) then the service hangs
right
when
it returns the object. Any ideas anyone?
Define "hangs". Is it taking 100% CPU, is it "just not returning", is it
timing out, or what?
--
John Saunders [MVP]
Hi John thanks for the reply. What happens is as I step thru the code I
see all the property accessors being hit. When one of the properties is
null the cursor passes over it and nothing further happens. The CPU
looks OK in the process manager, it was only at like 1 or 2%. It doesn't
even timeout (unless I simpluy haven't waited long enough, about 3 mins).
It just never returns.
Sorry, did you say which Visual Studio version you're running?
Try single-stepping through the code in the property accessor that fails.
Carefully note the values in the "Autos" window. In particular, there's a
null out there somewhere: what does the code do with the null? Perhaps it
tries to dereference it and an exception is thrown?
--
John Saunders [MVP]