This snippet defines a function `printat()` which adds line and file information to the normal `print()` function output. The intended use is a quick and dirty debugging information for everyday's use. A more complete solution is to use a logging/debugging/tracing framework.

Member Avatar
Member Avatar
+5 forum 3

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: …

Member Avatar
Member Avatar
+0 forum 1

The End.