EPiServer reports “ClassFactory not initialized” when the class factory for EPiServer is not installed before it is used. Example of this is using the class factory products in Global.asaxs Application_start (which is pretty stupid you can’t ) .
For more information about this read EPiServers article about this
Another reason can be that you running a IIS6 on an IIS7 web.config, then you has to downgrade you web.config file so it will work on IIS6. I wrote a simple example of this web.config IIS7 to IIS6
Addition to Wrong web.config
If other modules are installed the ClassFactory error can occur if these modules are placed after EPiServers standard set of modules in web.config: InitializationModule, Initializer, WorkflowRuntime and UrlRewriteModule. Place the new modules above the standard modules to resolve the issue.