I have this error from time to time.
It's always fixed with staring at the web.config file. Something is broken in it. As soon as you fix the conig file, the error will disappear.
Or the second reason of this error: read the ULS log , there is a high possibility to discover the issue with loading some of the dll from SafeControl zone. or Event Log may say you that he can't find a class from the dll which is in the SafeControl section in the web.config