Sitecore: An instance of Sitecore.Data.Items.Item was null. Additional information: Failed to find the root item "/".
This one was my vault. I tried to get rid for the viewstate to gain speed. So I disabled Viewstate for the whole website and sitecore backend via web.config.
The better solution is to do it in Codebehinf or in the ASCX files.
<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="WebService.ascx.cs" Inherits="ICR..WebServices.WebService" %>
Server Error in '/' Application.
Exception Details: System.InvalidOperationException: An instance of Sitecore.Data.Items.Item was null. Additional information: Failed to find the root item "/".
Source Error:
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249
The better solution is to do it in Codebehinf or in the ASCX files.
In ASCX files:
<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="WebService.ascx.cs" Inherits="ICR..WebServices.WebService" %>
In code behind :
Do it like this:protected void Page_Init(object sender, EventArgs e) { this.EnableViewState = false; }
Server Error in '/' Application.
An instance of Sitecore.Data.Items.Item was null. Additional information: Failed to find the root item "/".
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.InvalidOperationException: An instance of Sitecore.Data.Items.Item was null. Additional information: Failed to find the root item "/".
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249
Comments
Post a Comment
a new comment