Dotnetnuke Site settings PageLoadException: Object reference not set to an instance of an object

倾然丶 夕夏残阳落幕 提交于 2019-12-25 04:27:25

问题


I cant reach site setting. I just get this error messages: PageLoadException: Object reference not set to an instance of an object and a: System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

i really confuse about this error and has search for a fix, but found no solution for it.

is there anyone who knows how to solve it? Or have any idea how to? here is the stacktrace from the database:

DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.

exec sp_executesql N';Exec dbo.AddEventLog @0, @1, @2, @3, @4, @5, @6, @7, @8, @9',N'@0 nvarchar(4000),
@1 nvarchar(4000),@2 nvarchar(4000),@3 nvarchar(4000),@4 int,@5 nvarchar(4000),@6 datetime,@7 nvarchar(4000),
@8 nvarchar(4000),@9 int',@0=N'10728972-108f-40d7-8d2f-d2e1769df26f',@1=N'PAGE_LOAD_EXCEPTION',@2=NULL,@3=N'host',
@4=0,@5=N'sitename',@6='2014-02-28 09:10:43.487',@7=N'de-1896',@8=N'
<LogProperties><LogProperty><PropertyName>AssemblyVersion</PropertyName>
<PropertyValue>7.0.4</PropertyValue></LogProperty><LogProperty><PropertyName>PortalID</PropertyName>
<PropertyValue>0</PropertyValue></LogProperty><LogProperty><PropertyName>PortalName</PropertyName><PropertyValue>sitename</PropertyValue>
</LogProperty><LogProperty><PropertyName>UserID</PropertyName><PropertyValue>1</PropertyValue>
</LogProperty><LogProperty><PropertyName>UserName</PropertyName><PropertyValue>host</PropertyValue></LogProperty>
<LogProperty><PropertyName>ActiveTabID</PropertyName><PropertyValue>39</PropertyValue></LogProperty>
<LogProperty><PropertyName>ActiveTabName</PropertyName><PropertyValue>Site Settings</PropertyValue></LogProperty><LogProperty><PropertyName>RawURL</PropertyName>
<PropertyValue>/Admin/SiteSettings/tabid/39/Default.aspx</PropertyValue></LogProperty>
<LogProperty><PropertyName>AbsoluteURL</PropertyName><PropertyValue>/Default.aspx</PropertyValue></LogProperty>
<LogProperty><PropertyName>AbsoluteURLReferrer</PropertyName>
<PropertyValue>http://www.sitename.se/Default.aspx?tabid=39&amp;error=Object+reference+not+set+to+an+instance+of+an+object.&amp;content=0</PropertyValue></LogProperty>
<LogProperty><PropertyName>UserAgent</PropertyName><PropertyValue>Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0</PropertyValue></LogProperty>
<LogProperty><PropertyName>DefaultDataProvider</PropertyName><PropertyValue>DotNetNuke.Data.SqlDataProvider, DotNetNuke</PropertyValue></LogProperty>
<LogProperty><PropertyName>ExceptionGUID</PropertyName><PropertyValue>bd332125-6839-4fb7-bf42-387dfa7a3de0</PropertyValue></LogProperty><LogProperty>
<PropertyName>InnerException</PropertyName><PropertyValue>Object reference not set to an instance of an object.</PropertyValue></LogProperty>
<LogProperty><PropertyName>FileName</PropertyName><PropertyValue /></LogProperty><LogProperty><PropertyName>FileLineNumber</PropertyName><PropertyValue>0</PropertyValue></LogProperty>
<LogProperty><PropertyName>FileColumnNumber</PropertyName><PropertyValue>0</PropertyValue></LogProperty><LogProperty><PropertyName>Method</PropertyName>
<PropertyValue>DotNetNuke.Services.FileSystem.FolderManager.GetFolders</PropertyValue></LogProperty><LogProperty><PropertyName>StackTrace</PropertyName>
<PropertyValue /></LogProperty><LogProperty><PropertyName>Message</PropertyName>

<PropertyValue>DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.

  at DotNetNuke.Services.FileSystem.FolderManager.GetFolders(Int32 portalID, String permissions, Int32 userID)
   at DotNetNuke.Web.UI.WebControls.DnnFilePickerUploader.LoadFolders()
   at DotNetNuke.Web.UI.WebControls.DnnFilePickerUploader.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---</PropertyValue></LogProperty><LogProperty><PropertyName>Source</PropertyName><PropertyValue /></LogProperty></LogProperties>',@9=6

here is the other one:

System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

 exec sp_executesql N';Exec dbo.AddEventLog @0, @1, @2, @3, @4, @5, @6, @7, @8, @9',N'@0 nvarchar(4000),@1 nvarchar(4000),@2 nvarchar(4000),@3 nvarchar(4000),@4 int,
           @5 nvarchar(4000),@6 datetime,@7 nvarchar(4000),@8 nvarchar(max) ,@9 int',@0=N'f911ebc6-474a-4c0e-b5ea-2899ae046187',
           @1=N'GENERAL_EXCEPTION',@2=NULL,@3=N'host',@4=0,@5=N'sitename',@6='2014-02-28 09:10:43.423',@7=N'de-1896',@8=N'
           <LogProperties><LogProperty><PropertyName>AssemblyVersion</PropertyName><PropertyValue>7.0.4</PropertyValue></LogProperty>
           <LogProperty><PropertyName>PortalID</PropertyName><PropertyValue>0</PropertyValue></LogProperty><LogProperty><PropertyName>PortalName</PropertyName>
           <PropertyValue>sitename</PropertyValue></LogProperty><LogProperty><PropertyName>UserID</PropertyName><PropertyValue>1</PropertyValue></LogProperty>
           <LogProperty><PropertyName>UserName</PropertyName><PropertyValue>host</PropertyValue></LogProperty><LogProperty><PropertyName>ActiveTabID</PropertyName>
           <PropertyValue>39</PropertyValue></LogProperty><LogProperty><PropertyName>ActiveTabName</PropertyName><PropertyValue>Site Settings</PropertyValue></LogProperty>
           <LogProperty><PropertyName>RawURL</PropertyName><PropertyValue>/Admin/SiteSettings/tabid/39/Default.aspx</PropertyValue></LogProperty>
           <LogProperty><PropertyName>AbsoluteURL</PropertyName><PropertyValue>/Default.aspx</PropertyValue></LogProperty><LogProperty><PropertyName>AbsoluteURLReferrer</PropertyName>
           <PropertyValue>http://www.sitename.se/Default.aspx?tabid=39&amp;error=Object+reference+not+set+to+an+instance+of+an+object.&amp;content=0</PropertyValue></LogProperty>
           <LogProperty><PropertyName>UserAgent</PropertyName><PropertyValue>Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0</PropertyValue></LogProperty>
           <LogProperty><PropertyName>DefaultDataProvider</PropertyName><PropertyValue>DotNetNuke.Data.SqlDataProvider, DotNetNuke</PropertyValue></LogProperty>
           <LogProperty><PropertyName>ExceptionGUID</PropertyName><PropertyValue>ed0cf9b8-5fe9-4e88-8fd1-53f076f2bc83</PropertyValue></LogProperty>
           <LogProperty><PropertyName>InnerException</PropertyName>
           <PropertyValue>Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.</PropertyValue></LogProperty>
           <LogProperty><PropertyName>FileName</PropertyName><PropertyValue /></LogProperty><LogProperty><PropertyName>FileLineNumber</PropertyName>
           <PropertyValue>0</PropertyValue></LogProperty><LogProperty><PropertyName>FileColumnNumber</PropertyName><PropertyValue>0</PropertyValue></LogProperty>
           <LogProperty><PropertyName>Method</PropertyName><PropertyValue /></LogProperty><LogProperty><PropertyName>StackTrace</PropertyName><PropertyValue /></LogProperty>
           <LogProperty><PropertyName>Message</PropertyName>          
 <PropertyValue>System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. 
           ---&gt; System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
           at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
           at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, 
           TdsParserStateObject stateObj, Boolean&amp; dataReady)
           at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
           at System.Data.SqlClient.SqlDataReader.get_MetaData()
           at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
           at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, 
           Task&amp; task, Boolean asyncWrite)
           at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, 
           TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite)
           at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
           at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
           at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
           at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
           at DotNetNuke.Data.PetaPoco.PetaPocoExt.ExecuteReader(Database database, String sql, Object[] args)
           at DotNetNuke.Data.SqlDataProvider.ExecuteReader(String procedureName, Object[] commandParameters)
           at DotNetNuke.Data.DataProvider.GetFoldersByPortalAndPermissions(Int32 portalId, String permissions, Int32 userId)
           at DotNetNuke.Services.FileSystem.FolderManager.GetFoldersByPermissionSortedCallBack(CacheItemArgs cacheItemArgs)
           at DotNetNuke.Common.Utilities.DataCache.GetCachedDataFromRuntimeCache(CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired)
        ClientConnectionId:575f718e-8d18-49f1-a536-0e29e2d20c9a</PropertyValue></LogProperty><LogProperty><PropertyName>Source</PropertyName><PropertyValue />
        </LogProperty></LogProperties>',@9=4    

回答1:


I think I've already encountered this error. It may result from a too large number of folder in your portal directory and an important number of users.
The one solution I've found is to modify a stored procedure.
I suggest you to verify the code of "GetFoldersByPermissions".
My change consists to comment 2 joins which seems to be unneeded:
JOIN dbo.UserRoles UR ON UR.RoleID = FP.RoleID
JOIN dbo.Users U ON U.UserId = UR.UserId



来源:https://stackoverflow.com/questions/22091288/dotnetnuke-site-settings-pageloadexception-object-reference-not-set-to-an-insta

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!