Don’t trust SharePoint error messages
The following post was retrieved from: http://vspug.com/kwanl/2006/07/06/don-t-trust-sharepoint-error-messages/
Recently we’ve been trying to automate the provisioning of web part pages that require many customized web parts. Because of design issues we decided to do this from a ASPX page in the _layouts folder.
Things we going smoothly until we started getting the dreaded “not registered as safe” errors when trying to add our web parts. That was not the case because the web parts were installed and running. Through some experimentation, we discovered that it worked if the web parts were in the GAC. Combining the confusing error message and this new information would lead you to believe that you’re dealing with a security issue. That is not the case.
The real problem was that the web part assemblies could not be located by the ASPX page in _layouts. So it was really an assembling binding error.
Solution: Use a web service to add the web parts to the web part page.
Daniel Larson ran into a similar problem: