If you have just created an ASPX document, with inline code, and you get this error from running it, all you need to do is to go to your web.config file, and in the SharePoint/SafeMode/PageParserPaths section, add an entry for your page, including the path: