hi fellows,

my server seems to be sometimes returning wrong html to webclients.

in order to debug this issue, id like to trace the html that asp.net is sending.

in the Global_asax_PreRequestHandlerExecute i can access the response code and status, but cant seem to find the body html

i tried to read the OutputStream like this:

Dim ms = New MemoryStream
CurContext.Response.OutputStream.CopyTo(ms)
Dim sr = New StreamReader(ms)
Dim rtext = sr.ReadToEnd

but that throws a NotSupportedException Stream does not support reading.

i have seen some solutions, but they mostly work for WCF, i need something more general

any ideas?

note: this is not wcf or webservice of any kind, but rather standard html pages (.aspx)

thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.