a.) Put the
b.) Set EnableTheming = "False" on page. But this in itself doesn't work. Another workaround I saw was set StylesheetTheme="" Theme="" on the page. Even this didn't do the trick.
What worked for me was the comment on MS Connect page: http://connect.microsoft.com/VisualStudio/feedback/details/102039/using-themed-css-files-requires-a-header-control-on-the-page-e-g-head-runat-server">
So I added a web.config in the folder where I had the page that was throwing an exception and insert
< pages theme="">
My page was using MS Virtual Earth and this error would block my custom code to be called from the Mapping.js file to display the push pins on the map.