3

我们刚刚将一个新站点部署v6到一个运行多个站点的主机v4上,这没问题。在前端,它看起来不错,但在 Umbraco 管理员中,内容和媒体树看起来是空的。

在浏览器调试器中,我可以看到TreeDataService.ashx.

错误如下,我不确定问题是什么。是权限吗?数据库用户权限?

----------


You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider
Parameter name: SqlSyntaxProvider
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentNullException: You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider
Parameter name: SqlSyntaxProvider

源错误:

在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

堆栈跟踪:

[ArgumentNullException: You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider
Parameter name: SqlSyntaxProvider]
   Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig.get_SqlSyntaxProvider() +89
   Umbraco.Core.Persistence.Mappers.BaseMapper.GetColumnName(Type dtoType, PropertyInfo dtoProperty) +57
   Umbraco.Core.Persistence.Mappers.ContentMapper.Map(String propertyName) +67
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.VisitMemberAccess(MemberExpression m) +112
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.Visit(Expression exp) +101
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.VisitBinary(BinaryExpression b) +258
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.Visit(Expression exp) +159
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.VisitLambda(LambdaExpression lambda) +120
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.Visit(Expression exp) +72
   Umbraco.Core.Persistence.Querying.Query`1.Where(Expression`1 predicate) +20
   Umbraco.Core.Services.ContentService.GetChildren(Int32 id) +312
   umbraco.cms.businesslogic.web.Document.GetChildrenForTree(Int32 NodeId) +39
   umbraco.cms.presentation.Trees.BaseContentTree.Render(XmlTree& Tree) +27
   umbraco.loadContent.Render(XmlTree& tree) +19
   umbraco.presentation.webservices.TreeDataService.LoadTree(TreeRequestParams treeParams) +79
   umbraco.presentation.webservices.TreeDataService.GetXmlTree() +140
   umbraco.presentation.webservices.TreeDataService.ProcessRequest(HttpContext context) +55
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
4

3 回答 3

17

检查你的 umbraco db 连接字符串。

<add name="umbracoDbDSN"....... 

如果它确实包含

providerName="System.Data.SqlClient"

然后添加并检查。相同。它可能会开始工作。

于 2013-05-13T06:57:09.180 回答
0

问题是它SqlSyntaxProvider 是空的,我的解决方法是初始化它。

var service = new Umbraco.Core.Services.ContentService();
    SqlSyntaxContext.SqlSyntaxProvider = new MySqlSyntaxProvider();
于 2013-04-29T08:26:45.947 回答
0

连接字符串,添加 name="umbracoDbDSN" ...缺少以下 providerName="System.Data.SqlClient"

一旦我将它添加到行中,事情就开始工作了。

于 2016-04-30T21:26:16.793 回答