对象引用未设置为对象的实例。在sitecore中

对象引用未设置为对象的实例。在sitecore中,sitecore,nullreferenceexception,sitecore7.2,Sitecore,Nullreferenceexception,Sitecore7.2,我将在本地环境中开发的所有sitecore数据移动到Amazon Web服务的服务器上。 我附上了数据库。设置IIS。并重写连接字符串。 但它不起作用。当我访问首页时,我看到了这样的错误页面 描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源 异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例 源错误: 在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异

我将在本地环境中开发的所有sitecore数据移动到Amazon Web服务的服务器上。
我附上了数据库。设置IIS。并重写连接字符串。
但它不起作用。当我访问首页时,我看到了这样的错误页面

描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例

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

堆栈跟踪:

[NullReferenceException: Object reference not set to an instance of an object.]
   Sitecore.Diagnostics.Log.Error(String message, Exception exception, Type ownerType) +246
   Sitecore.Configuration.Factory.LoadAutoIncludeFiles(ConfigPatcher patcher, String folder) +1064
   Sitecore.Configuration.Factory.GetConfiguration() +331
   Sitecore.Diagnostics.LoggerFactory..cctor() +58

[TypeInitializationException: The type initializer for 'Sitecore.Diagnostics.LoggerFactory' threw an exception.]
   Sitecore.Diagnostics.LoggerFactory.GetLogger(Type type) +28
   Sitecore.Diagnostics.Log.Error(String message, Exception exception, Type ownerType) +150
   Sitecore.Configuration.Factory.LoadAutoIncludeFiles(ConfigPatcher patcher, String folder) +1065
   Sitecore.Configuration.Factory.GetConfiguration() +332
   Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) +117
   Sitecore.Resources.Media.UploadWatcher.InitializeIgnoreList() +182

[TypeInitializationException: The type initializer for 'Sitecore.Resources.Media.UploadWatcher' threw an exception.]
   Sitecore.Resources.Media.UploadWatcher..ctor() +0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +159
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +127
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +14407909
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +198
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +83
   System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +334
   System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12601936
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12441597
当地环境
  • 视窗7
  • SQL Server 2012 sp1
  • IIS 7.5
  • Sitecore 7.2版
AWS环境
  • Windows服务器R2标准
  • SQL Server 2012 Express sp1
  • IIS 8.5
  • Sitecore 7.2版
我已经试过了写在这页上的所有方法() 但这些技术在这种情况下不起作用。 如果有人知道,请告诉我怎么做。
谢谢。

这给出了异常的原因:

Sitecore.Configuration.Factory.LoadAutoIncludeFiles(ConfigPatcher patcher, String folder) +1064
Sitecore.Configuration.Factory.GetConfiguration() +331
其中一个配置包含文件(
/App\u config/include
)中有错误
其中可能有一些格式不正确的XML


另外,请确保其中没有
*.Debug.config
*.Release.config
文件。

我从未遇到过您的问题,但有一篇博客文章可能会帮助您在您的站点中使用lucene搜索吗?我在“/App\u config/Include”中检查了文件。我看不到任何Debug.config和Release.config。那么一定是XML错误。我百分之百肯定你的配置文件中存在问题。谢谢你,鲁德!我将尝试在配置文件中查找问题。您也可以通过将文件重命名为类似于*.disabled的名称来逐个禁用这些文件,并每次刷新Sitecore以查找导致问题的文件。