471,088 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,088 software developers and data experts.

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
4 1981
"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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.