我正在将sitefinity应用程序迁移到azure web角色。数据库已经迁移到sql azure。使用DataConfig.config中的连接字符串,应用程序在我的本地计算机上运行正常。但是,一旦我添加了一个云项目并(在telerik文档中提到必要的更改 - azure程序集重定向,dataconfig更改,app.dll.config文件,内部端点,本地存储)并将此应用程序设置为Web角色它不起作用。当我在本地运行azure模拟器中的云项目或部署为云服务时,我收到以下错误。
枚举转换失败,因为属性/字段不可为空且无 已从数据库中读取值。描述:未处理 在执行当前Web请求期间发生异常。 请查看堆栈跟踪以获取有关错误的更多信息 它起源于代码。
异常详细信息:System.InvalidOperationException:枚举转换 由于属性/字段不可为空而且没有值,因此失败 从数据库中读取。
源错误:在此期间生成了未处理的异常 执行当前的Web请求。有关原产地的信息 可以使用异常来识别异常的位置 堆栈跟踪下面。
堆栈追踪:
[InvalidOperationException:枚举转换失败,因为 property / field不可为空,也没有从中读取任何值 数据库。] OpenAccessRuntime.Data.EnumConverter.Read(DataHolder& 持有人)+470
OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(的ResultSet rs,FetchGroupField [] fetchGroups,Int32 firstCol)+346[DataStoreException:读取字段时出错 Telerik.Sitefinity.Forms.Model.FormDraft.k__BackingField 来自ResultSet:System.InvalidOperationException:枚举转换 由于属性/字段不可为空而且没有值,因此失败 从数据库中读取。在 OpenAccessRuntime.Data.EnumConverter.Read(DataHolder& holder)at OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(的ResultSet rs,FetchGroupField [] fetchGroups,Int32 firstCol) System.InvalidOperationException:枚举转换失败,因为 property / field不可为空,也没有从中读取任何值 数据库。在OpenAccessRuntime.Data.EnumConverter.Read(DataHolder& 持有人) OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(的ResultSet rs,FetchGroupField [] fetchGroups,Int32 firstCol)]
DynamicModule.ns.Wrapped_OpenAccessFormsProvider_f4f053b2c49247a8908c30d75bf02970.GetForm(Guid formId)+413
Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.get_FormData() +759 Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.ProcessFormInitialization() +21 Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.InitializeControls(GenericContainer) 容器)+55
Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls()+88
System.Web.UI.Control.EnsureChildControls()+ 189 System.Web.UI.Control.PreRenderRecursiveInternal()+60
System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Control.PreRenderRecursiveInternal()+ 222 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) 4297
我也检查了telerik论坛,发现只有2个帖子出现此错误,但建议的解决方案无效。
解决此问题的任何解决方案都会有所帮助。
答案 0 :(得分:0)
为web中的所有telerik dll和其他第三方DLL添加程序集重定向。 Config和app.DLL.config我还运行了db中sitefinity论坛中提到的3个更新脚本。这解决了问题,网站出现了。