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.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • Docker 1.3 公布

    Docker 1.3 公布

  • 代码保护(一) 几款加壳工具[通俗易懂]

    代码保护(一) 几款加壳工具[通俗易懂]DRMsoftEncryptEXE(有激活成功教程版)加密模式:非绑定模式—-加密后的文件不绑定用户电脑,但用户需要一个开启密码才可以打开绑定模式—-一机一码授权,加密后的文件不同用户电脑需要不同的开启密码无密码模式—-加密后的文件无需要开启密码即可运行,仅对原始文件做加密保护一码通模式—-采用相同秘钥和产品编号加密的不同文件,在同台电脑上只需认证一次特点:可以设置加密…

  • arcgis10.2许可服务器无法启动_gis连接到数据库失败

    arcgis10.2许可服务器无法启动_gis连接到数据库失败记录一次eruka注册中心访问有时404,但是接口路径存在的问题一.事件发生背景二.问题发生原因三.解决办法一.事件发生背景微服务架构,多人共同在自己本地开发同一个微服务,但是注册中心只有一个二.问题发生原因多人在自己本地起项目,注册到了同一个注册中心,且注册的服务名字都一样,因此当请求到达eruka注册中心时,会轮训或随机访问存活的节点,当请求访问到其他人的微服务时,就404了,请求访问到自己的微服务,就正常了(开发的时候,一个application对应了多个服务)三.解决办法将自己的微服务

  • 数据可视化工具d3与echarts的区别

    数据可视化工具d3与echarts的区别数据可视化工具d3与echarts的区别

  • C++ vector用法(详解!!函数,实现)

    C++ vector用法(详解!!函数,实现)1,简述一下vector的基本操作,它的size,capacity(),clear,reverse,reserve,  push_back等!!!2,说说,vector的存储特性,是顺序存储还是如同链表般,如果是顺序存储的话,那么是如何执行  erase,insert等函数,???(假如后面的空间不够的话,我们需要合理的算法来重新找出一块  相应的空间吗???拷贝,回收吗???是不

  • USB转485/232

    USB转485/232USB转485模块双向传输防浪涌屏蔽线UT-890a/Z-TECUSB转232模块双向传输防浪涌屏蔽线Z-TEC

发表回复

您的电子邮箱地址不会被公开。

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