471,309 Members | 1,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

CPU Hangs on Deserialize

Reg
OK, Here is the issue:

I have a string of XML that has been validated against the XSD.

This XSD also created a class called XMLRequest (using xsd.exe).

When I attempt the following code, my CPU is zooming to near 100%
(aspnet_wp) eventually the request times out.

---------
XmlSerializer xs;
MemoryStream memoryStream ;
XmlTextWriter xmlTextWriter ;

xs = new XmlSerializer(typeof(XMLRequest));
memoryStream = new MemoryStream(xmlutil.StringToUTF8ByteArray(xmlfile ));
xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);

//CODE DIES HERE
XMLRequest xRequest=(XMLRequest)xs.Deserialize(memoryStream);
//CODE DIES HERE
---------

Any ideas what may be causing this? My XML/XSD is fairly straigtforward,
only ever nests to 2 deep at the max.

Are there certain structures or other wise I should avoid? Or perhaps a
better method for doing this.

Thanks for Reading!

Reg


Nov 28 '05 #1
0 961

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Carl Mercier | last post: by
2 posts views Thread by Greg | last post: by
3 posts views Thread by Amsteel | last post: by
2 posts views Thread by PCH | last post: by
3 posts views Thread by Reg | last post: by
2 posts views Thread by Thomas S | last post: by
reply views Thread by connectpalm03-forum | last post: by
reply views Thread by rosydwin | last post: by

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.