HTTPListener Exception and 404 Not Found error
Hi,
I will be very very thankfull if someone can help me in handling exceptions related to connections etc in HTTPListener class.
I am making a Proxy server that listens to the requests from the browser through port 8080 by using the HTTPListener class and then forwards those requests through HTTPWebRequest and HTTPWebResponse Classes. After getting the response in HTTPWebResponse Object, the programs tries to write the response back to the browser using the HTTPListenerResponse object.
1. I often get the error of 404 Not Found when i call the GetResponse method of HTTPWebRequest object.
2. I get exception of "An operation was attempted on a nonexistent network connection" when i try to write back the response to the browser. I dont know whats wrong with the connection managment of it. i tried with keeping the Keep Alive property TRUE and increase the limit but still giving the same errors.
Thanks in advance.
|