前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >stimulsoft mvc html,asp.net mvc – stimulsoft report mvc kill session – Stack Overflow

stimulsoft mvc html,asp.net mvc – stimulsoft report mvc kill session – Stack Overflow

作者头像
全栈程序员站长
发布2022-09-13 10:16:36
4070
发布2022-09-13 10:16:36
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

I use stimulssoft report mvc for generating a report in an asp.net website.

The report generates fine in “local” but when the site is uploaded to a server and a report is generated the user’s session has been destroyed and the user is redirected to the login page. This is the report view:

@using Stimulsoft.Report.Mvc;

@{Layout = null;}

plan report

@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()

{

Theme = StiTheme.Office2013,

ActionGetReportSnapshot = “ShowPlanReport”,

ActionViewerEvent = “ViewerEvent”,

ActionExportReport = “ExportReport”,

ActionPrintReport = “PrintReport”,

ClientRequestTimeout = 90000,

ServerRelativeUrls = true,

})

and this is ShowPlanReport action in administrator Controller.

public virtual ActionResult ShowPlanReport()

{

List FinalResult = new

List();

var db = new anjomanEntities();

foreach(Plan temp in reportList)

{

ReportPlanFullViewModel model = new ReportPlanFullViewModel();

model.PlanID = temp.ID;

model.Farmer = temp.Farmer;

model.NationalCode = temp.NationalCode;

model.System = temp.WaterSystem.Name;

model.RainArea = temp.RainArea;

model.DropArea = temp.DropsArea;

model.Mobile = temp.Mobile;

model.Address = temp.Address;

model.Village = temp.Village;

if(db.PlanTopograpger.Where(x=>x.PlanID == temp.ID).Count() > 0)

{

model.Topograph = db.PlanTopograpger.FirstOrDefault(x => x.PlanID == temp.ID).Topographer.Name;

model.Topograph += ” “;

model.Topograph = db.PlanTopograpger.FirstOrDefault(x => x.PlanID == temp.ID).Topographer.Family;

}

else

{

model.Topograph = “”;

}

if(db.PlanDesignerAdvisor.Where(x => x.PlanID == temp.ID).Count() > 0)

{

model.Design = db.PlanDesignerAdvisor.FirstOrDefault(x => x.PlanID == temp.ID).Advisor.Name;

model.Design += ” “;

model.Design += db.PlanDesignerAdvisor.FirstOrDefault(x => x.PlanID == temp.ID).Advisor.Family;

}

else if (db.PlanDesignerCompany.Where(x => x.PlanID == temp.ID).Count() > 0)

{

model.Design = db.PlanDesignerCompany.FirstOrDefault(x => x.PlanID == temp.ID).Company.Name;

}

else

{

model.Design = “”;

}

if(db.PlanChecker.Where(x => x.PlanID == temp.ID).Count() > 0)

{

model.Checker = db.PlanChecker.FirstOrDefault(x => x.PlanID == temp.ID).Company.Name;

}

else

{

model.Checker = “”;

}

if(db.PlanExecute.Where(x => x.PlanID == temp.ID).Count() > 0)

{

model.Executer = db.PlanExecute.FirstOrDefault(x => x.PlanID == temp.ID).Company.Name;

}

else if (db.PlanExeHistory.Where(x => x.PlanID == temp.ID).Count() > 0)

{

model.Executer = db.PlanExeHistory.FirstOrDefault(x => x.PlanID == temp.ID).Company.Name;

}

else

{

model.Executer = “”;

}

if(db.PlanValidate.Where(x => x.PlanID == temp.ID && x.Validate == true && x.PlanExecute == true).Count() > 0)

{

model.ValidDate = ToJalali(db.PlanValidate.FirstOrDefault(x => x.PlanID == temp.ID && x.Validate == true && x.PlanExecute == true).ValidDate);

}

else

{

model.ValidDate = “”;

}

FinalResult.Add(model);

}

var mainReport = new Stimulsoft.Report.StiReport();

mainReport.Load(Server.MapPath(“~/Report/PlanReport.mrt”));

//

try

{

mainReport.Compile();

}

catch(Exception c)

{

ViewBag.Message = c.Message;

}

mainReport.RegBusinessObject(“plan_business”, FinalResult);

return

Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapshotResult(mainReport);

}

There is no log, no exception and I can’t find out the source of problem. Please help.

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/159861.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云顾问
云顾问(Tencent Cloud Smart Advisor)是一款提供可视化云架构IDE和多个ITOM领域垂直应用的云上治理平台,以“一个平台,多个应用”为产品理念,依托腾讯云海量运维专家经验,助您打造卓越架构,实现便捷、灵活的一站式云上治理。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档