I am writing a .Net MVC website, and using IIS express.
How do Is stop images from being served up through the .Net pipeline. I appricate I can ignore the route by doing this: routes.IgnoreRoute("favicon.ico")
. But I don't want the code to be hit at all.
I tried adding this to the system.webServer
section in the web.config
<handlers>
<add name="StaticFile-ico" path="*.ico" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
</handlers>
But this has no effect. What am I doing wrong?