More in this section
Forums / Bugs & Issues / "Data Is Null" Error on /sitefinity/admin.default.aspx

"Data Is Null" Error on /sitefinity/admin.default.aspx

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Jon Kramme
    Jon Kramme avatar
    15 posts
    20 Dec 2009
    25 Jan 2011
    Link to this post
    Something (we're not sure what) caused our production Sitefinity 3.6 Community Edition (build 1936) site to begin throwing a "Data Is Null" error on the /sitefinity/admin/default.aspx page.  The public-facing side of the site is working fine.

    We also have a dev site and test site running build 1936, and neither of those sites is exhibiting the same behavior.  Each site is in a separate root folder on the same physical web server and has a corresponding SQL 2005 database (all three databases running on the same SQL Server instance).

    When I change the production web.config connection string to point to the test database, the error goes away, so this leads me to believe something is wrong with the production database (data or structure).  I've looked in all of the *Variables tables and verified that the "SchemaVersion" is 1936.  This matches the version shown on the DLL files in the BIN folder.

    I've included the full stack trace of the error.  Short of rolling the database back to a backup prior to the introduction of the error, what else might I check or try to resolve this problem?


    Server Error in '/' Application.

    Data is Null. This method or property cannot be called on Null values.

    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.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

    Source Error: 

    Line 93: 
    Line 94: 		bool hasPerm = false;
    Line 95: 		foreach (ICmsPage page in manager.GetPages())
    Line 96: 		{
    Line 97: 			Telerik.Cms.Security.PagePermission testPerm = new Telerik.Cms.Security.PagePermission(page);

    Source File: d:\IACPAweb\Sitefinity\Admin\Default.aspx.cs    Line: 95 

    Stack Trace: 

    [SqlNullValueException: Data is Null. This method or property cannot be called on Null values.]
       System.Data.SqlClient.SqlBuffer.get_String() +4839013
       System.Data.SqlClient.SqlDataReader.GetString(Int32 i) +96
       Nolics.ORMapper.DataProviders.SQLDataProvider.ParseResult(Int32 fromRow, Int32 maxRows, DataSet dsResult, IDataReader rd) +88
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +466
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +286
       Nolics.ORMapper.Base.QueryBase`1.LoadAll() +23
       Telerik.Cms.Data.DefaultProvider.GetPages() +113
       Telerik.Cms.CmsManager.GetPages() +12
       Admin_Default.hintsPanel_DataBound(Object sender, EventArgs e) in d:\IACPAweb\Sitefinity\Admin\Default.aspx.cs:95
       System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +97
       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +140
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
       Admin_Default.Page_Load(Object sender, EventArgs e) in d:\IACPAweb\Sitefinity\Admin\Default.aspx.cs:188
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       Telerik.Cms.Web.CmsPageBase.OnLoad(EventArgs e) +55
       Telerik.Cms.Web.AdminPage.OnLoad(EventArgs e) +19
       Admin_Default.OnLoad(EventArgs e) in d:\IACPAweb\Sitefinity\Admin\Default.aspx.cs:69
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    25 Jan 2011
    Link to this post
    Hello Jon,

    • Check whether your database is not corrupted.
    • Make sure that all stored procedures are there( there are about .
    • Check if is a missing record containing the schema version in the database tables - *_Variables.
    • If the there are two websites with different version connected to the same database you are making each time a page from one of the websites is requested.

    Typically this error occurs when you're trying to assign a NULL value to a variable or object. The error could appear if some of the stored procedures are not created correctly due to insufficient permission rights or you are using the store procedure bodies which in some cases affects the tables.
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered