Hi;
I am trying to learn to use Stimulsoft with MVC 5. I have created one according to the sample but gives the following error:
The required anti-forgery form field "__RequestVerificationToken" is not present.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Mvc.HttpAntiForgeryException: The required anti-forgery form field "__RequestVerificationToken" is not present.[/b][/color]
My view is like following:
@using Stimulsoft.Report.Mvc;
@{
ViewBag.Title = "Sales Invoice";
}
<h2>This is a test page</h2>
<body>
@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
Actions =
{
GetReport = "GetReport",
ViewerEvent = "ViewerEvent"
}
})
</body>
and have the following controller
[RoutePrefix("PIS/OutsaleReport"), Route("{action=index}")]
//[PageAuthorize()]
public class MedOutOrderReportController : Controller
{
public ActionResult Index()
{
return View("~/Modules/PIS/MedOutOrder/GetReport.cshtml");
}
public ActionResult GetReport()
{
var p = new Alias("MedOutOrder", "p");
var c = new Alias("MedOutOrderDetails", "c");
var m = new Alias("lkpMedicine", "m");
var query = new SqlQuery()
.From(p)
.From(c)
.Select(p + "CustomerName")
.Select(p + "OrderDate")
.Select(c + "Quantity")
.Select(c + "DailyDose")
.Select(c + "Comment")
.Select(m + "(GenericName + ' (' + BrandName) +') '", "MedicineName")
.Select(c + "UnitPrice")
.Select(c + "Discount")
.Select(c + "TotalMount")
.Select(p + "MedOutOrderId")
.OrderBy(p + "MedOutOrderId")
.ToString();
var data = query.ToList();
StiReport report = new StiReport();
string Path = Server.MapPath("~/Modules/Reports/OutsalesInvoice.mrt");
report.Load(Path);
report.RegBusinessObject("MedOutOrders", data); // نام شیئی که در دیزانر ایجاد کردیم
report.Dictionary.SynchronizeBusinessObjects(1);
CheckReference(report);
return StiMvcViewer.GetReportResult(report);
}
public ActionResult ViewerEvent()
{
return StiMvcViewer.ViewerEventResult();
}
Am i missing anything?
Stimulsoft report viewer error
-
- Posts: 6244
- Joined: Tue Mar 20, 2018 5:34 am
Re: Stimulsoft report viewer error
Hello,
Please send us a sample project which reproduces the issue for analysis.
Thank you.
Please send us a sample project which reproduces the issue for analysis.
Thank you.
-
- Posts: 1
- Joined: Fri Feb 15, 2019 9:04 am
Re: Stimulsoft report viewer error
Hello @haman,
I am also facing the same error.
Do you have any updates on this ?
I am also facing the same error.
Do you have any updates on this ?
-
- Posts: 6244
- Joined: Tue Mar 20, 2018 5:34 am
Re: Stimulsoft report viewer error
Hello,
Please try to check the last release version.
Thank you.
Please try to check the last release version.
Thank you.