volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

PropertyControlFactory error

We have taken on an EPiServer site from another company and having a number of issues with running the code.  One of the problems we are getting is the error: No class factory with id PropertyControlFactory has been registered on load.  The error occurs in global.asax on line:

PropertyControlClassFactory.Instance.RegisterClass(typeof(PropertyString), typeof(PropertyStringExControl));

The site loads if this line is commented out. We have no experience with the EPiServer.Core.PropertyControlClassFactory so would appreciate any help on why we are having this problem.

 

 
#54907
Nov 09, 2011 12:41

Check if your web.config file has this line under  episerver.baseLibrary/classFactories:

<add type="EPiServer.Core.PropertyControlClassFactory, EPiServer" id="PropertyControlFactory">

Also, in what stage of Global.asax do you try to do the registration? It could be that it is done too early.

#54909
Nov 09, 2011 13:39

Maybe this is the same as register a Property ControlAdapters in the App_Browsers folder

#54910
Nov 09, 2011 14:30

In what method does this set up reside? Could it be that this code is executed before the PropertyControlClassFactory has been set up? Perhaps you could move it to a later event in the application start up?

#54921
Nov 09, 2011 19:32

Thanks for your suggestions.

The registration is under Application_Start event within global.asax

<add type="EPiServer.Core.PropertyControlClassFactory, EPiServer" id="PropertyControlFactory"> exists in web.config.

We have a site working correctly on a staging environment that was handed over to us.  The code and configuration is on the development environment is virutally the same as stage.  The main differences are: location of the EPiServer database and OS.  Stage is on a Server 2008 and development on Windows 7.  Also the solution is using EPiServer Mail.  Could that be tripping the code up>

#54945
Nov 10, 2011 11:08

Application_Start could be too early so it could be down to timing which can give different behaviour on different environments. I suggest you implement an InitializableModule and move your code to its Initialize method.

#54947
Nov 10, 2011 11:16

I installed the site onto Windows Server 2008 which had EPiServer 6 CMS on it.  The site then ran successfully.  So I installed EPiServer Mail 5 but that broke the site.  Removed EPiServer Mail but left framework 6.1.79.0 and now getting the PropertyControlFactory error.

#54959
Nov 11, 2011 12:47

If you just want a quick solution move this configuration to the configuration section in web.config. You should have a commented out section with an example on how to do this in the default installation.

#54967
Nov 11, 2011 16:16
error This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.