c# - How does preCondition="managedHandler" work for modules? -
after reading documentation integrated pipeline i'm confused how iis determines when run managed modules, managed request is, , how determined, e.g.:
http://www.iis.net/learn/application-frameworks/building-and-running-aspnet-applications/aspnet-integration-with-iis http://blogs.msdn.com/b/tmarq/archive/2007/08/30/iis-7-0-asp-net-pipelines-modules-handlers-and-preconditions.aspx
"managed" requests mentioned several times. there's 1 instance explained managed request request has mapping managed handler. there's quote saying handler "special" module (second link).
modules described runs every request , handler has mapping specifies when should run (e.g. http *.aspx) (second , first links). furthermore, modules execute_request_handler [which i'm assuming point handler runs] comes after several stages of pipeline (after begin_request, authenticate, authorize, etc...), implies there's step happens before that, establishes request managed handler, disable execution of modules have precondition="managedhanlder" when request not managed handler.
i feel there's i'm missing here, can shed light how precondition="managedhandler" works?
from blog post (http://blogs.iis.net/thomad/archive/2006/11/04/precondition-what.aspx) :
the managedhandler precondition
iis 7.0 introduces new managed extensibility model. handlers , modules can written in managed code , directly integrated iis request pipeline. switching between managed , native code expensive operation. managedhandler precondition introduced allow optimizing performance of requests no managed code needs involved, example when static files (.html, .jpg etc.) served. no managed code called if request served native handler , every managed module configured managedhandler precondition. practical scenario forms authentication. managed forms authentication module has managedhandler precondition , therefore called when asp.net content (e.g. *.aspx) pages requested. if .html page requested forms authentication not called. if want protect content forms authentication can remove managedhandler precondition forms authentication module entry.
in short, if request can served native iis module (say, image instance), not have go through managed pipeline (for instance, "global.asax" events , more), resulting in huge performance gain.
edit: actual answer question : handlers mappings. associates file extension specific handler. find below how edit these mappings in ii7. can find more information handler mapping here.
Comments
Post a Comment