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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 用Attributes.Add添加事件

    用Attributes.Add添加事件1、(textbox2.Visible=true)JS的寫法:    textbox2.Attributes.Add(“onfocus”,”document.getElementById(‘textbox2’).style.display=”);2、(textbox2.Visible=false)JS的寫法:    textbox2.Attributes.Add(“onfocus”,”document.getElementById(‘textbox2’).style.display=’no

    2022年9月26日
  • ArcGIS server 10.2安装教程详细版

    ArcGIS server 10.2安装教程详细版详细讲述arcgisserver10.2的安装教程。默认已经安装arcgisDesktop10.2。提供一个arcgisserver下载地址:链接:https://pan.baidu.com/s/1iXol6v3RiqjU2MLvbnwNFA提取码:7fzf(失效了请和我说)一、所需文件1.ArcgisServer10.2安装文件。2.ArcgisSer…

    2022年5月25日
  • Java中char,short,int,long占几个字节和多少位[通俗易懂]

    Java中char,short,int,long占几个字节和多少位[通俗易懂]1.字节:byte:用来计量存储容量的一种计量单位;位:bit2.一个字节等于8位1byte=8bitchar占用的是2个字节16位,所以一个char类型的可以存储一个汉字。整型:byte:1个字节8位-128~127short:2个字节16位int:4个字节32位long:8个字节64位浮点型:float:4个字节32位doub……

    2022年8月15日
  • 用 Python 破解了同学压缩文件的密码

    用 Python 破解了同学压缩文件的密码↑↑↑关注后"星标"简说Python人人都可以简单入门Python、爬虫、数据分析简说Python推荐作者:blank#来源:https://blog.csdn.n…

    2022年5月25日
  • winform与cefsharp混合开发_winform窗体

    winform与cefsharp混合开发_winform窗体CefSharpGitHub地址:传送门wiki帮助文档地址:传送门简介CefSharp简单来说就是一款基于.Net写的,支持在Winform和WPF中内嵌的Chrome浏览器的第三方包。快速入门安装要求:VisualStudiowithNuGetPackageManager(>=2010).使用Nuget添加引用,搜索CefSharp,

    2022年9月19日
  • THINKPHP AJAX实例代码「建议收藏」

    THINKPHP AJAX实例代码「建议收藏」HTML文件: $(function(){ $(“#filename”).blur(function(){ varvalue=$(this).val(); $.ajax({ type:”GET”, url:”__URL__/ajax_check/name/”+value, dataType:”text”, success:fun

    2022年8月16日

发表回复

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

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