I have a design of JQuery calling a .ashx file returning a small table, which was working fine all this time. However, suddenly the http handler seems to be returning the whole html page instead, not everytime though.

I bet the content of the result page is an error page... can you dump the result ? did you tried to open the ashx file and its argument direclty within the browser ?
–
Steve BJun 27 '11 at 10:53

Thanks. I tried to open the ashx and it seems to work fine. The handler has a try catch block to catch any error, so the .ashx should return a custom error message. There seems to be no ULS logs also showing any errors. And the most important part is that this doesnt happen all the time. It works intermittently :(
–
user3374Jun 27 '11 at 12:48