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 OverflowIusestimulssoftreportmvcforgeneratingareportinanasp.netwebsite.Thereportgeneratesfinein”local”butwhenthesiteisuploadedtoaserverandareportisgeneratedtheuser’ssessionh…

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

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.net/159861.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 北美CS四大名校(美国前四大城市)

    1.北美CS方面三个梯队总体上讲Top20的计算机方向可以分成三个梯队:一、4个最为优秀的computerscienceProgram是麻省理工大学MIT,斯坦福大学Stanford,加州伯克莱分校UC.Berkeley和卡奈基梅隆CMU。这四家基本没什么争议,得到大家的广泛认可。二、6个其他前十的computerscience:UIUC,康乃尔大学Cornell,华盛顿大学U.o

    2022年4月12日
    111
  • 【Android开发】范例2-实现放大镜效果

    【Android开发】范例2-实现放大镜效果

    2021年9月6日
    51
  • Pytest(11)allure报告[通俗易懂]

    Pytest(11)allure报告[通俗易懂]前言allure是一个report框架,支持java的Junit/testng等框架,当然也可以支持python的pytest框架,也可以集成到Jenkins上展示高大上的报告界面。mac环境:

    2022年7月31日
    5
  • ArcGis二次开发遇到的问题

    ArcGis二次开发遇到的问题在我们刚开始利用.net对arcgis进行二次开发时,费了牛鼻子劲安装好了arcgisengine,也在vs中建立了新项目,拖进去了工具条控件,主页面控件,想要欣赏一下成果的时候,发现一点击启动就报错了:查阅相关资料后发现,在主程序中加入这样两行代码,给程序进行授权,就可以顺利运行了。在这里强烈推荐牟乃夏老师的一系列书籍,从arcgis基础知识到开发自己的gis软件,非常有用。后面有时间我会…

    2022年7月23日
    7
  • Jenkins安装_ansible jenkins

    Jenkins安装_ansible jenkins前言jenkins的环境搭建方法有很多,本篇使用docker快速搭建一个jenkins环境。环境准备:mac/Linuxdockerdocker拉去jenkins镜像先下载jenkins镜

    2022年8月6日
    11
  • 算法—时间复杂度[通俗易懂]

    算法—时间复杂度[通俗易懂]附录log对数:等差数列什么是等差数列?一般地,如果一个数列从第2项起,后一项与它的前一项的差等于同一个常数,那麽这个数列就叫做等差数列。这个常数叫做等差数列的公差,公差通常用字母d表示。例1:初识。-{1,3,5,7,9}公差为2-{5,15,25,35,45}公差为10-{2,68,134,200,266}公差为66-{5…

    2022年5月14日
    52

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号