I have an object which I Serialize to XML using the XmlTextWriter and
sending the output directly to the Response.OutoutStream.

However, if the Serialization fails for some reasion, I end up with a half
serialized XML document, and my:

catch(Exception err)
    {
        Response.Write("<?xml version='1.0' ?>");
        Response.Write("<error>");
        writeErrorException(err);
        Response.Write("</error>");
        ssSql.Close();
        return;
    }

Which is a bit useless. What I need to do is to change what is allready in
the OutputStream, and replace it with my error response. Otherwise the
systen in the other end, think it is some perfectly formated xml it is
getting, but it is not.

<Thomas/>

---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to