This is an attribute "allowPathInfo" in the system.webServer/handlers collection - you need to set it for whichever handler you want to apply it to. Eg:
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/handlers -[name='StaticFile'].allowPathInfo:true
Note, that is just an example, you probably never want to set it to true for that handler.