Monday, December 25, 2006

the type of page you have requested is not served because it has been explicitly forbidden. The extension .mdb may be incorrect.Please review the URL

Situation:
After uploading a '.mdb' file on to sharepoint server, when you click on the '.mdb' file you get the error:
the type of page you have requested is not served because it has been explicitly forbidden. The extension .mdb may be incorrect.Please review the URL below and make sure that it spelled correctly.

Reason:
ISAPI extension for the '.mdb' is available in the IIS available ISAPI modules and trying to execute this extension. But the '.mdb' file is forbidden to execute on the server.

Fixes:

If you are not technical savy or do not have any permissions to do the below changes, Mouse hover on the file name in the doc lib and select "down load a copy" from the context menu.


Temp fix:
Take out the 'ISAPI extension' for the .MDB file from the IIS.
This will be fixed in 5 minutes, but needs the IIS to be halted.
Stop the IIS and do the following steps.

  1. Go to the sharepoint server
  2. IIS -> Websites
  3. Right click on the web application -> properties
  4. Home Directory -> Configuration
  5. Scroll down the 'ISAPI' extensions -> select '.mdb' -> Remove.
    iisreset

Permanent fix:
Take out the 'mdb' ISAPI module from the ASP.NET configuration.

  1. Go to the CONFIG folder on the machine where, ASP.NET is installed.
    dir:\Windows\Microsoft.NET\Framework\Version\CONFIG and open the web.config file
  2. Search for the following snippet
    in the <httpHandlers> section:
    <add path="*.mdb" verb="*" type="System.Web.HttpForbiddenHandler" validate="True" />
    AND
    add the following lines

    a) <add path="*.mdb" verb="*" type="System.Web.UI.PageHandlerFactory" validate="True" /> in the <httpHandlers> section


    b) <add extension=".aspx" type="System.Web.Compilation.PageBuildProvider" /> in the <buildProviders> section