I have a custom ASP.Net server in a WinForms application. The server was created using CreateApplicationHost and a simple HttpWorkerRequest implementation.
I find that the custom server only processes requests for aspx files. If I try to access xml / txt / png files from the browser, it gives a “The resource cannot be found.” error.
My question is: what must be done to be able to serve such files?
The answer is that the HttpWorkerRequest.SendResponseFromFile method must be overridden to send the file via the response stream.