问题
MS Cassini Development Web Server is a nice product that executes web requests in a similar way that IIS7 does. Every request (event for static content) goes through the same .Net pipeline without exception. All custom HttpModule can handle any request.
But sometimes you don't want these modules to execute for certain content (most often static content). In this regard, MS Cassini doesn't read/obey <system.webServer>
web.config settings like IIS7 does. I'm particularly interested in these settings.
<system.webServer>
...
<handlers />
<modules />
</syste.webServer>
Does UltiDev's Cassini (a separate payable product upgraded from MS Cassini) web server read these settings and execute as the web.config tells it to?
回答1:
Cassini doesn't behave like IIS7, but like IIS6. So you should use <system.web>
sections instead of <system.webServer>
:
<system.web>
...
<httpHandlers />
<httpModules />
</system.web>
The reason all requests go through the ASP.NET pipeline is because it is hardwired to do that (like having wildcard mapping on in IIS6)
回答2:
My company makes a product called the Neokernel Web Server that runs ASP.NET web applications, but static content is served without using the ASP.NET pipeline. It's a commercial product, but a free evaluation license is available.
来源:https://stackoverflow.com/questions/1168881/ultidev-cassini-and-system-webserver-web-config-settings