Hi,
The problem happens when IIS returns a 404 before the request can even reach mojoPortal code and mojoPortal can do nothing in that case.
I've had some mixed success with handling 404 for pages with no extension like http://yoursite/foo
It works for me on my local machine with IIS 7.5 by adding this in user.config:
<add key="DetectPageNotFoundForExtensionlessUrls" value="true"/>
and by changing this in Web.config
from this:
<modules>
to this:
<modules runAllManagedModulesForAllRequests="true">
but I find it does not work on my server which is Win 2008 with IIS 7.0
it also doesn't seem to work for extensions that already may have handler mappings like foo.html
The best solution I can suggest is to make a custom static html file with a similar design as your site and configure it as the 404 page for your site in IIS or do some googling about "iis 7 custom 404" for more ideas.
Hope that helps,
Joe