简体   繁体   English

Sitefinity 4.1定制模块

[英]Sitefinity 4.1 custom module

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: 我已经完成了基于教程的操作(添加了一些示例字段),但是在重新启动应用程序后出现了此错误:

No metadata has been registered for class ProductCatalog.Model.ProductItem. 没有为类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.) (这通常表明该类未声明为持久类或声明为持久性但未增强。该类是从file:/// C:/ Program Files / Telerik / Sitefinity 4.1 / Projects / pssite / bin / ProductCatalog加载的.DLL。)

Stack Trace : 堆栈跟踪

[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& value) +101
   Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object& 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& policyStatus) +186
   Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object& value) +182
   Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object& 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& completedSynchronously) +76*

I'm using SF4.1 Did anyone else get this error? 我正在使用SF4.1,还有其他人收到此错误吗?

This problem is almost always a misconfiguration of open access for the project when using the fluent mapper for your data model. 当使用流畅的映射器作为数据模型时,此问题几乎总是错误地配置了项目的开放访问。

You need to unload the project and edit the .csproj file to enhance it for openaccess. 您需要卸载项目并编辑.csproj文件,以增强它的openaccess性能。 For specific instructions, check this link under the section "Integration with OpenAccess Enhancer": http://www.telerik.com/help/openaccess-orm/fluent-mapping-getting-started-fluent-mapping-api.html#Integration_with_OpenAccess_Enhancer 有关特定说明,请在“与OpenAccess Enhancer集成”部分下检查此链接: http : //www.telerik.com/help/openaccess-orm/fluent-mapping-getting-started-fluent-mapping-api.html#Integration_with_OpenAccess_Enhancer

Let me know if this doesn't resolve the problem 让我知道这是否不能解决问题

hope this was helpful! 希望这对您有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM