c# - HttpHandlers and HttpHandlerFactories -


I would like to root incoming requests for various resources, such as some returned files such as CSS, the responses generated by other servers Returns, and others are being redirected to ASPX pages for AJAX functionality.

All configurations use an HTTPMDUUD to remotely clear all requests for a handler, where the URL is parsed and sent, as an entry point for the server.

I am thinking that what would be the best configuration to handle the requests, should I repmittate the handlerfactor from HTTMDUD, where I parse the URL, and the appropriate handler based on that URL Root or am I trying to set it to everyone in web.config?

In addition to how can I request on the ASPX page from HTTPAndLiter and HTThindLftCtp?

If the rules of routing requests for different handlers are very simple (for example ". Handler xyz" ) Surely you web. Built-in with config. The NET system should be used - there is no reason to change the wheel again here. If the argument is possibly more complex or just deals with more than extension mapping, a module is appropriate.

Secondly, you should use an HTTPHandler factory, because one factory IHttpHandlers, and ASPX page is an IHttpHandler if you use your custom factory, if your logic Determines that it should be "route" on the ASPX page, then you can do directly from the factory:

  IHttpHandler the page = PageParser.GetCompiledPageInstance (requestPath, pathToAspxFile, HttpContext); Back to page;  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -