Strange Exception with WebMethod

K

Kevin Spencer

Hi All,

I'm experienceing a new and strange problem with a WebMethod I am working
on. It creates an instance of a class which contains a number of fields,
Collections, and classes, all of which are serializable (I'm pretty sure).
It compiles fine, and when I run it, I can step through all of the code I
wrote without exception, but it returns the following message:

"There was an error generating the XML document. --> index is outside the
bounds of this Collection"

Anyone have a clue as to where to find the answer to this? I haven't been
able to Google a thing.

--
Thanks,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
C

cbDevelopment

Does this error happen only through code or does it happen if you hit the
ASMX through an application like Web Service Studio (or the local test
page)? If it only happens in code, The place to look would be the
reference.vb file.

You don't have to use the generated classes in the reference.vb, you can
erase them and add whatever imports are neccesary to make it use your
original classes. This might be a good troubleshooting step.
 
K

Kevin Spencer

Thanks,

I figured it out. There actually WAS an exception occurring, which was being
trapped. When I stepped through the code, I stepped over the method call
that raised the exception. Fortunately, I was also logging exceptions, so
when I went into the log I found the exception and the source of it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top