得到错误'devexpress.dashboard.v16.2.core.dll中发生类型'system.nullreferenceexception'的异常,但未在用户代码中处理' [英] Got an error 'an exception of type 'system.nullreferenceexception' occurred in devexpress.dashboard.v16.2.core.dll but was not handled in user code'

查看:94
本文介绍了得到错误'devexpress.dashboard.v16.2.core.dll中发生类型'system.nullreferenceexception'的异常,但未在用户代码中处理'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了样本MVC devexpress Dashboard应用程序。



我收到错误'DevExpress.Dashboard.v16.2中发生了'System.NullReferenceException'类型的异常.Core.dll但在更新gloabal.asax.cs中的数据提取时未在用户代码中处理。





void RegisterDefaultDashboard (string dashboardId)

{

string dashboardLocalPath = Server.MapPath(string.Format(@〜/ App_Data / Dashboards / {0} .xml,dashboardId)) ;

SessionDashboardStorage.Instance.RegisterDashboard(dashboardId,XDocument.Load(dashboardLocalPath));

ReloadExtract_Click(dashboardId);

}

protected void ReloadExtract_Click(string dashboardId)

{

使用(Dashboard newDashboard = new Dashboard())

{

newDashboard.LoadFromXml(Server.MapPath(string.Fo rmat(@〜/ App_Data / Dashboards / {0} .xml,dashboardId)));

var dataSources = newDashboard.DataSources.OfType< dashboardextractdatasource>()。ToArray();

foreach(dataSources中的DashboardExtractDataSource dataSource)

dataSource.UpdateExtractFile();

}

}



请建议我



我尝试过:



void RegisterDefaultDashboard(string dashboardId)

{

string dashboardLocalPath = Server.MapPath(string.Format(@〜/ App_Data / Dashboards / {0} .xml,dashboardId));

SessionDashboardStorage.Instance.RegisterDashboard(dashboardId,XDocument.Load(dashboardLocalPath));

ReloadExtract_Click(dashboardId);

}

protected void ReloadExtract_Click(string dashboardId)

{

使用(仪表板newDashboard = new Dashboard())

{

newDashboard.LoadFromXml(Server.MapPath(string.Format(@〜/ App_Data / Dashboards / {0} .xml,dashboardId)));

var dataSources = newDashboard.DataSources.OfType< dashboardextractdatasource>()。ToArray();

foreach(dataSources中的DashboardExtractDataSource dataSource)

dataSource.UpdateExtractFile();

}

}

I created Sample MVC devexpress Dashboard application.

I got an error 'An exception of type 'System.NullReferenceException' occurred in DevExpress.Dashboard.v16.2.Core.dll but was not handled in user code' while updating the data extract in gloabal.asax.cs.


void RegisterDefaultDashboard(string dashboardId)
{
string dashboardLocalPath = Server.MapPath(string.Format(@"~/App_Data/Dashboards/{0}.xml", dashboardId));
SessionDashboardStorage.Instance.RegisterDashboard(dashboardId, XDocument.Load(dashboardLocalPath));
ReloadExtract_Click(dashboardId);
}
protected void ReloadExtract_Click(string dashboardId)
{
using (Dashboard newDashboard = new Dashboard())
{
newDashboard.LoadFromXml(Server.MapPath(string.Format(@"~/App_Data/Dashboards/{0}.xml", dashboardId)));
var dataSources = newDashboard.DataSources.OfType<dashboardextractdatasource>().ToArray();
foreach (DashboardExtractDataSource dataSource in dataSources)
dataSource.UpdateExtractFile();
}
}

Please suggest me

What I have tried:

void RegisterDefaultDashboard(string dashboardId)
{
string dashboardLocalPath = Server.MapPath(string.Format(@"~/App_Data/Dashboards/{0}.xml", dashboardId));
SessionDashboardStorage.Instance.RegisterDashboard(dashboardId, XDocument.Load(dashboardLocalPath));
ReloadExtract_Click(dashboardId);
}
protected void ReloadExtract_Click(string dashboardId)
{
using (Dashboard newDashboard = new Dashboard())
{
newDashboard.LoadFromXml(Server.MapPath(string.Format(@"~/App_Data/Dashboards/{0}.xml", dashboardId)));
var dataSources = newDashboard.DataSources.OfType<dashboardextractdatasource>().ToArray();
foreach (DashboardExtractDataSource dataSource in dataSources)
dataSource.UpdateExtractFile();
}
}

推荐答案

给定您使用的第三方库似乎在其代码中有例外(虽然它可能是您的使用中的问题,说实话)我建议您将这类问题引导到他们的论坛。



DevExpress论坛 - 演示组件,IDE生产力工具,报告,应用程序框架 - Developer Expr ess Inc. [ ^ ]



我使用他们的winforms库并且他们的社区非常活跃,所以通过将你的问题引导到上面的链接,你将有更好的时间获得有用的帮助。
Given that you are using a 3rd party library that appears to have had an exception within its code (although its probably an issue in your usage to be honest) I would suggest you direct this kind of question to their forums.

DevExpress Forums - Presentation Components, IDE Productivity Tools, Reporting, App Frameworks - Developer Express Inc.[^]

I use to work with their winforms library and their community is pretty active so you'll have a lot better time of getting useful help by directing your question to the link above.


这篇关于得到错误'devexpress.dashboard.v16.2.core.dll中发生类型'system.nullreferenceexception'的异常,但未在用户代码中处理'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆