Dotnetnuke站点设置PageLoadException:对象引用未设置为对象的实例

时间:2014-02-28 09:36:19

标签: dotnetnuke

我无法达到网站设置。我只是收到此错误消息:PageLoadException:对象引用未设置为对象的实例 和a:System.ComponentModel.Win32Exception(0x80004005):等待操作超时

我真的对此错误感到困惑并且已经搜索了修复程序,但没有找到解决方案。

有谁知道如何解决它? 或者有任何想法如何? 这是数据库中的堆栈跟踪:

DotNetNuke.Services.Exceptions.PageLoadException:未将对象引用设置为对象的实例。 ---> System.NullReferenceException:未将对象引用设置为对象的实例。

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

这是另一个:

System.Data.SqlClient.SqlException(0x80131904):超时已过期。操作完成之前经过的超时时间或服务器没有响应。            ---&GT; System.ComponentModel.Win32Exception(0x80004005):等待操作超时

 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 个答案:

答案 0 :(得分:1)

我想我已经遇到过这个错误。这可能是由于门户网站目录中的文件夹数量过多以及用户数量很大 我发现的一个解决方案是修改存储过程 我建议你验证“GetFoldersByPermissions”的代码 我的更改包括评论似乎不需要的2个连接:
JOIN dbo.UserRoles UR ON UR.RoleID = FP.RoleID
加入dbo.Users U ON U.UserId = UR.UserId