Hi All
I am creating a proxy server in c#. I made it working except in case of partial postbacks. During partial postback, it is throwing exception saying
Message from webpage
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
<!DOCTYPE html P'.
OK
The application is working fine when I am trying to access directly. The error occurs when I access through my proxy server. The common causes, the error metions are not there in the application, since it is working fine while accessing directly.
There are some differences that I don't know between normal and asynchronous postbacks. When I debug, I could not find any difference between a normal and partial postback. From the error I know, the proxy server is returning the whole page html instead of returning the UpdatePanel html only.
Can anybody help how to make it working?
My proxy server application is basically listening on a particular port for any httprequest and based on the HttpListenerRequest it gets, it creates a HttpWebRequest and sends the request to the original web application. Then it receives the HttpWebResponse and creates a HttpListenerResponse from that and sends it to the browser.
My code is based on the code given in http://www.codeproject.com/KB/IP/reverseproxy.aspx
Thanks in advance