How to serve aspx-free files from a custom ASP.Net server

I have a custom ASP.Net server in a WinForms application. The server was created using CreateApplicationHost and a simple implementation of HttpWorkerRequest .

I found that the user server only processes requests for aspx files. If I try to access the xml / txt / png files from the browser, it gives "Resource cannot be found". error.

My question is: what needs to be done to be able to serve such files?

+3
source share
1 answer

The answer is that the HttpWorkerRequest.SendResponseFromFile method must be overridden to send the file through the response stream.

0
source

All Articles