Last post Jan 24, 2011 04:08 AM by newbmn
Jan 20, 2011 08:43 AM|newbmn|LINK
I have an httpmodule and it has a handler for OnEndRequest. I am trying to write the HttpContext.Response.OutputStream to a file. I am trying to use the Read method of it. But when it is called the exception message i get is "Specified method is not supported".
So i am not able to do what i want that is, write the response to a file on the disk. I am able to write the HttpContext.Request.InputStream to a file using its Read method which i do in a handler for OnBeginRequest.
Please give some ideas.
Jan 21, 2011 07:54 AM|NikxGupta|LINK
are u using write method shuldnt it be
Jan 24, 2011 04:08 AM|newbmn|LINK
The WriteFile method takes the contents of the file specified and writes to the Response stream and not the other way.
I need to get the contents from the Response stream and write it to a file which is the opposite of what the WriteFile method does.