title: Sitefinity 4.1 custom module
body: <p>I'm tried to install the Products module. I've done based on the tutorial (add to sample a few fields) but after restating the app I got this error:</p>
  
  <blockquote>
    <p>No metadata has been registered for class ProductCatalog.Model.ProductItem. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Program Files/Telerik/Sitefinity 4.1/Projects/pssite/bin/ProductCatalog.DLL.)</p>
  </blockquote>
  
  <p><strong>Stack Trace</strong>: </p>
  
  <pre><code>[OpenAccessException: No metadata has been registered for class ProductCatalog.Model.ProductItem. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Program Files/Telerik/Sitefinity 4.1/Projects/pssite/bin/ProductCatalog.DLL.)]
     DynamicModule.ns.Wrapped_OpenAccessRoleProvider_975c8a0a334c43b7a81f0a078afb63cf.GetRolesForUser(Guid userId) +230
     Telerik.Sitefinity.Security.SitefinityPrincipal.Initialize() +1036
     Telerik.Sitefinity.Security.SitefinityPrincipal.get_Roles() +9
     Telerik.Sitefinity.Configuration.RolePolicyHandler.GetPolicyNames(ConfigProvider configProvider, ConfigSection section) +46
     Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object&amp; value) +101
     Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object&amp; value) +87
     Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop) +56
     Telerik.Sitefinity.Services.SystemConfig.get_CacheDependencyHandlers() +68
     Telerik.Sitefinity.Data.CacheDependency..cctor() +79
  [TypeInitializationException: The type initializer for 'Telerik.Sitefinity.Data.CacheDependency' threw an exception.]
     Telerik.Sitefinity.Data.CacheDependency.Subscribe(Type handlerType, Object trackedItem, ChangedCallback callback) +0
     Telerik.Sitefinity.Configuration.ConfigCacheDependency.Initialize(CacheItem owningCacheItem) +74
     Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.CacheItem.InitializeExpirations() +30
     Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.Cache.Add(String key, Object value, CacheItemPriority scavengingPriority, ICacheItemRefreshAction refreshAction, ICacheItemExpiration[] expirations) +508
     Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager.Add(String key, Object value, CacheItemPriority scavengingPriority, ICacheItemRefreshAction refreshAction, ICacheItemExpiration[] expirations) +28
     Telerik.Sitefinity.Configuration.ConfigSection.HasPolicy(ConfigPolicyHandler policyHandler, String policyName, PolicyStatusInfo&amp; policyStatus) +186
     Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object&amp; value) +182
     Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object&amp; value) +87
     Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop) +56
     Telerik.Sitefinity.Configuration.ConfigElement.get_Item(String propertyName) +68
     Telerik.Sitefinity.Security.Configuration.SecurityConfig.get_ApplicationRoles() +17
     Telerik.Sitefinity.Security.SitefinityPrincipal.get_IsBackendUser() +56
     Telerik.Sitefinity.Security.SecurityManager.AuthenticateRequest(HttpContextBase context) +932
     Telerik.Sitefinity.Web.SitefinityHttpModule.Context_AuthenticateRequest(Object sender, EventArgs e) +18
     System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +168
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +76*
  </code></pre>
  
  <p>I'm using SF4.1 
  Did anyone else get this error?</p>