Orchard CMS安装错误?

4
我尝试从源代码安装Orchard CMS。我在VS 2012中打开它,我正在使用Sql Server 2012。
我遇到了以下错误:
错误文本:
Setup failed: could not execute query [ select rolerecord0_.Id as Id13_, rolerecord0_.Name as Name13_ from Test_Orchard_Roles_RoleRecord rolerecord0_ where rolerecord0_.Name=@p0 ] Name:p1 - Value:Anonymous [SQL: select rolerecord0_.Id as Id13_, rolerecord0_.Name as Name13_ from Test_Orchard_Roles_RoleRecord rolerecord0_ where rolerecord0_.Name=@p0]
我找不到任何解决此错误的方法。我哪里做错了?如何修复此错误?当我选择内置存储时,它可以运行。此外,如果我使用内置存储,是否存在任何缺点?
更新(新错误消息):
安装失败:无法执行查询 [ SELECT TOP (@p0) this_.Id as Id17_2_, this_.Number as Number17_2_, this_.Published as Published17_2_, this_.Latest as Latest17_2_, this_.Data as Data17_2_, this_.ContentItemRecord_id as ContentI6_17_2_, contentite1_.Id as Id16_0_, contentite1_.Data as Data16_0_, contentite1_.ContentType_id as ContentT3_16_0_, contenttyp4_.Id as Id18_1_, contenttyp4_.Name as Name18_1_ FROM Orchard_Framework_ContentItemVersionRecord this_ inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id left outer join Orchard_Framework_ContentTypeRecord contenttyp4_ on contentite1_.ContentType_id=contenttyp4_.Id WHERE contentite1_.Id = @p1 and this_.Published = @p2 ] Name:cp0 - Value:2 Name:cp1 - Value:True [SQL: SELECT TOP (@p0) this_.Id as Id17_2_, this_.Number as Number17_2_, this_.Published as Published17_2_, this_.Latest as Latest17_2_, this_.Data as Data17_2_, this_.ContentItemRecord_id as ContentI6_17_2_, contentite1_.Id as Id16_0_, contentite1_.Data as Data16_0_, contentite1_.ContentType_id as ContentT3_16_0_, contenttyp4_.Id as Id18_1_, contenttyp4_.Name as Name18_1_ FROM Orchard_Framework_ContentItemVersionRecord this_ inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id left outer join Orchard_Framework_ContentTypeRecord contenttyp4_ on contentite1_.ContentType_id=contenttyp4_.Id WHERE contentite1_.Id = @p1 and this_.Published = @p2]。

2
你的 SQL Server 用户拥有哪些数据库权限? - mdm
另外,请查看 app_data\logs 并获取完整的堆栈跟踪。 - Bertrand Le Roy
您可能还需要检查您的数据库排序规则:http://orchard.codeplex.com/workitem/17938 - Piotr Szmyd
@mdm,你说得对,看起来是权限问题。 - AliRıza Adıyahşi
@mdm,我找不到正确的权限。你能就权限方面提供一些建议吗? - AliRıza Adıyahşi
可能需要数据库所有者。 - Paul Devenney
3个回答

2
在创建 SQL Server 数据库之前,请将排序规则设置为 Latin1_General_100_CI_AS
操作步骤如下:在 SQL Server 管理工具上右键单击 Database 并选择 New Database。在 New Database 窗口中,输入数据库名称并点击左侧的 Option 选项卡。
您会看到 Collocation 下拉框在 New Database 窗口的顶部。将 default 更改为 Latin1_General_100_CI_AS。然后再次运行 Orchard 设置。

1
在IIS管理器中设置一个新的应用程序池,并将其运行为具有查询SQL服务器权限的帐户。然后将您的Orchard网站分配到使用该应用程序池。以下是设置应用程序池标识的屏幕截图,单击“高级设置”链接即可打开此菜单:

iis settings

在“进程模型”部分 - 将身份设置为具有SQL服务器权限的帐户。将“加载用户配置文件”=“false”。这将防止池在运行orchard网站时尝试检索用户配置文件。

0

我发现通常当我收到那个错误信息时,是因为正在执行的查询存在语法错误,或者表/列名称不匹配。如果您可以在异常抛出的地方停止执行,您可以检查InnerException以查看是否提供了更多信息。如果没有,只需从消息中复制SQL,使用值填充参数@p0、@p1、@p2,并尝试在您用于手动查询数据库的任何工具中运行它。这通常会给您一个更有帮助的错误信息。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接