This error occurred for me when i try to consume silver light xap files deployed in the /_CONTROLTEMPLATES/XAPS/ directory. The problem occurs when i had Windows 2008 server with IIS 7.0 and SharePoint 2007 is installed.
Even when a MIME entry is added to the IIS 7.0 the problem is still the same. The MIME entry for Silverlight is added by default by Windows 2008 server.
In IIS 7.0 navigate to the site, Right click and select “Features View”. On the right Pane select Handler Mappings, select the AboMapperCustom-n handler entry and on the right side of the pane click “Edit Feature Permissions…” from the Actions menu area. Place a check mark against Script and Execute, click Ok. Now it should work