855.367.3511 | CONTACT US

Author Topic: Using with MVC bundle. Javascript error.  (Read 29092 times)

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #30 on: January 25, 2017, 02:31:20 pm »
Actually I think I answered my own question which is yes, since the only issues with rendering the widgets is the two errors that will be fixed in the next build.  How will I get it? 

BTW there is just one more proof of concepts I need to verify and that limiting the view of reports and report folders to the user.  If I can get this to work we are ready to purchase it.

What I've done is setup two folders
Environmental
Porkview

I have a user that should have access to only the Porkview folder, but when I login under that user he can see both.  The applications authentication method is Windows.

taniac

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #31 on: January 25, 2017, 06:16:43 pm »
We have released new NuGet files for build 6.0.373.0. We have included fixes for your issue in this build.

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #32 on: January 26, 2017, 06:13:28 am »
Ok a couple of things:

Ran the latest NuGet package. After the deletion of the package the install process hung. Had to kill it after about 30mins.
Rebooted PC.
Re-ran the install selected "yes" to over-write existing files.
Did not execute Set FRConfig
Compilied the application and ran it.  Is still failing on the two errors.


Greg

Forerunner Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #33 on: January 26, 2017, 12:24:13 pm »
I am sure you have, but please make sure you have done a hard refresh of the browser cache. 

To set different security for windows access you need to either secure the reports to specific users using SSRS security or use IIS security to limit who has access to that vroot.

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #34 on: January 26, 2017, 01:48:45 pm »
Clearing of the cache did the trick. 

In regard to authorization.  I setup two SSRS folders and in I added access for the test user.  I deployed the mvc application to a test web application server (this server is seperate from the server that contains SSRS) and then logged in to my pc under the test user credentials, then using the brower I navigated to the application and both folders showed up instead of only one that I setup security right on for the test user.

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #35 on: January 26, 2017, 01:57:17 pm »
Sorry I tested it under Debug=true and it always work then.  Once I change compile to Release and Debug=false I'm still getting and error.

Code it's erroring on: t.$itemFavorite.hide()

Unable to get property 'hide' of undefined or null reference.

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #36 on: January 26, 2017, 02:13:26 pm »
FYI

And the cause of the error is 404 on call to:  Reports/api/ReportManager/isFavorite?path=%2F&instance=

It has "Reports/" which it shouldn't.

Greg

Forerunner Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #37 on: January 26, 2017, 04:56:50 pm »
Correct it should not.  Please send is the url of your app and the folder structure.  Are you using setAPIBase?

Forerunner Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #38 on: January 27, 2017, 07:42:32 am »
What type of authorization are you using in your ReportManager controller?  Unless you are using basic or forms or have setup kerberos , then the security context will not be passed to SSRS.  If you have configured it to use a system account or the service account, then SSRS permission will only reflect that account

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #39 on: January 27, 2017, 07:52:01 am »
When I run the application in Release we have the issues.

url http://localhost:53399

    It's a standard structure:

    • Porkview
      • Controllers
      • Forerunner
      • Models
      • sdk
      • Scripts
      • Views

Yes I have too or we start getting 404's for the api calls you code makes (see prior comments).  This is the javascript:
$(document).ready(function () {
    var $reportArea = $("#rptDiv");

    forerunner.config.setAPIBase("http://localhost:53399/api");

    forerunner.config.initialize(function () {
        this.explorer = $reportArea.reportExplorerEZ({
            isFullScreen: false
        });

    })
});

The thing about it is it's really almost a show stopper because if you have another view that utilizes the widget(s) you will have to setAPIBase in the javascript in that view.  Any view that creates an instance of the explorer will require this.  And now with this last error setting the api doesn't seem to help (fixed the prior errors, but not this).  Also the image is not showing on any reports in the folder but I suspect it might be due to the js error so it's not reaching to js code that set the report type image.

Forerunner Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #40 on: January 27, 2017, 08:05:14 am »
OK, we think we have figured it out.  It is because you are bundling the js files.  By default we determine the api path from the Forerunner js file path.  You do not have one because you are bundling them all.  If you bundle the "forerunner.min.js" then you must set call Forerunner.Config.setVirtualRootBase because we cannot determine it automatically.
 

gregs

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #41 on: January 27, 2017, 09:04:57 am »
Ok, that was it.  It's now displaying without any error and the images are showing the reports in the folders.  Don't want to sound rude but I felt it was a bundling issue all along since it was only occuring in Release and debug=false.  When not debugging it performs the actual bundling process.

Now the final piece is it's not filtering out a folder I know my test user does not have rights to (setup in SSRS).  I have the application deployed in IIS with Window Authentication enabled.  I googled and tryied changing the order of the Providers pushing Negotiate above NTLM, and setting ASP.NET Impersonation to Enabled as well but to no avail.  Is there a link to some steps that need to be taken to insure I have kerberose setup correctly?

Thanks

Greg

Forerunner Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Using with MVC bundle. Javascript error.
« Reply #42 on: January 30, 2017, 08:23:35 am »
We are not kerberose experts.  You can google it, there are many articles. There are different steps depending on your version of windows.  We do not recommend using windows integrated authentication because it is only supported by IE and not on any mobile device.  You can still use windows authentication, but with forms you get better support on all browsers and less challenge with setting up kerberos.