$ 0 0 MapImageLayer simply can't be casted to IMapRasterLayer. The only interfaces it supports is IMapImageLayer.