467,920 Members | 1,240 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,920 developers. It's quick & easy.

web service hangs

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?

Thanks
May 22 '07 #1
  • viewed: 1918
Share:
4 Replies
"WG" <WG@discussions.microsoft.comwrote in message
news:37**********************************@microsof t.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]
May 22 '07 #2
"John Saunders [MVP]" wrote:
"WG" <WG@discussions.microsoft.comwrote in message
news:37**********************************@microsof t.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.
Thanks again
May 22 '07 #3
"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]
May 22 '07 #4


"John Saunders [MVP]" wrote:
"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**********************************@microsof t.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]
Thanks John, I'll try that right now. This is happening with VS2005 standard edition on 2003 server sp1.
May 23 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.