Error in Dashboard loading @Helpers.DashboardHelper.GetLatestPackages()

Topics: Business Logic Layer, Controls
Jan 27, 2014 at 12:51 PM
I am getting below error while accessing default admin page. I am using 2.8 latest version it was working well and i haven't done any changes still throwing error.. please help me.

error is about get latest package loading ... i have tried to change the values from newest to ratings,alphanumeric but still didn't work


Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 65: <div class="rounded">
Line 66:


67: @Helpers.DashboardHelper.GetLatestPackages() Line 68: </div>
Line 69: </div>

Source File: d:\hosting\7940861\html\cloudcomputing\admin\default.cshtml Line: 67

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
ASP.Helpers.DashboardHelper.<GetLatestPackages>b__18(TextWriter __razor_helper_writer) +1264
System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10
System.Web.WebPages.WebPageBase.Write(HelperResult result) +80
ASP._Page_admin_default_cshtml.Execute() in d:\hosting\7940861\html\cloudcomputing\admin\default.cshtml:67
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +199
System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69
System.Web.WebPages.WebPage.ExecutePageHierarchy() +131
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +116
Jan 28, 2014 at 1:36 AM
Issue: Dashboard can't load.

I have exactly the same problem as the previous poster (which also started today), and like the previous poster I also made no updates, so I believe that I did not break the code to cause this error.

My blog loads normally, I can login normally, but when I click "dashboard" I get the following error displayed in the blog content area (the logfile area is not visible because the dashboard does not load):

Error Details:
Url :

Raw Url : /admin/default.cshtml

Message : Exception of type 'System.Web.HttpUnhandledException' was thrown.

Source : System.Web.WebPages

StackTrace : at System.Web.WebPages.WebPageHttpHandler.HandleError(Exception e)

at System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

TargetSite : Boolean HandleError(System.Exception)

Message : Object reference not set to an instance of an object.

Source : App_Code.qcidbirh

StackTrace : at ASP.Helpers.DashboardHelper.b__18(TextWriter __razor_helper_writer) in c:\inetpub\onestopshoppinglist\blog\App_Code\Helpers\DashboardHelper.cshtml:line 172

at ASP._Page_admin_default_cshtml.Execute() in c:\inetpub\onestopshoppinglist\blog\admin\default.cshtml:line 67

at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()

at System.Web.WebPages.WebPage.ExecutePageHierarchy()

at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)

at System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext)

TargetSite : Void b__18(System.IO.TextWriter)

Has anyone figured out why this is happening?
My blog is
Jan 28, 2014 at 2:15 AM
Accidentally I'm looking into issue with which went down this morning. No code changes in very long time but still happens, usually when server goes through the maintenance and IIS gets reconfigured. For example it "forgets" how to serve ".cshtml" pages. Basically I would put "helloWorld.cshtml" to the site root and check if it works.
Jan 28, 2014 at 3:40 AM
Issue: Dashboard can't load.

Update. This same error also occurs on my local Visual Studio development environment which also has not been updated recently.
I don't understand what the "packages" are supposed to do, but I think that the call to:

var packages = PackageRepository.FromGallery("all", 0, Gallery.OrderType.Newest);

is returning bad data. The PackageUrl for the packages are all null. I don't know where this data comes from, but if anyone knows where the package data comes from please post that info here.
Jan 28, 2014 at 8:05 PM
Issue: Dashboard can't load. UPDATE:

The issue of the packages having undefined data no longer happens. The problem was fixed somehow. I hope that Whoever fixed it will post here so the community knows what caused this error.