Page 1 of 1

Custom Routes with Stimulsoft MVC Viewer

Posted: Mon Apr 08, 2013 8:40 pm
by allo_man
We created a custom routes for our application, the custom route includes culture, but isn't limited to culture. The route config looks like this:

Code: Select all

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapActionRoute("Default", "{culture}/{controller}/{action}/{id}",
                new { controller = "Home", action = "Login", culture = "en", id = UrlParameter.Optional },
                new CultureConstraint(Culture.en.ToString(), Culture.fr.ToString(), Culture.ru.ToString())
            );
        }
So the URLs looks like
and for my report the URL looks:
The problem is that the report viewer is calling a URL via ajax that isn't formed correctly. the /en/ (culture part) isn't included in the Ajax call. It's calling:
To give you more info, the

Code: Select all

@Html.Stimulsoft().StiMvcViewer(@Model.StiMvcViewerOptions 
generates, from that line, we can see that the routes are ok, the problem is the requestUrl.

Code: Select all

"requestUrl":"https://localhost:44300/Certificat/","actionInteraction":"Interaction","routes":"%7b%22culture%22%3a%22en%22%2c%22action%22%3a%22CertificatMiseEnReserveReport%22%2c%22controller%22%3a%22Certificat%22%2c%22id%22%3a%221%22%7d"
And the StiMvcViewerOptions are:

Code: Select all

            StiMvcViewerOptions = new StiMvcViewerOptions()
                {
                    Theme = StiTheme.Office2010,
                    ActionGetReportSnapshot = "GetReportSnapshot",
                    ActionViewerEvent = "ViewerEvent",
                    ActionPrintReport = "PrintReport",
                    ActionExportReport = "ExportReport",
                    ActionInteraction = "Interaction"
                };
Is there anyway to configure our custom routes for the MvcViewer?

Re: Custom Routes with Stimulsoft MVC Viewer

Posted: Tue Apr 09, 2013 11:48 am
by Vladimir
Hello,

We have reproduced the error, we need some time to fix it.

Thank you.

Re: Custom Routes with Stimulsoft MVC Viewer

Posted: Tue Apr 09, 2013 12:48 pm
by allo_man
Thanks,
I'll wait for your fix.

Regards,
Alex

Re: Custom Routes with Stimulsoft MVC Viewer

Posted: Fri Apr 12, 2013 5:35 am
by HighAley
Hello.

We will let you know when it will be available.

Thank you.

Re: Custom Routes with Stimulsoft MVC Viewer

Posted: Mon Apr 15, 2013 8:27 am
by HighAley
Hello.

The issue is solved. The patch will be available in our next prerelease build on April 19.

Thank you.