#1 2015-08-03 18:30:44

mongonv
Member
Registered: 2015-07-31

Unable to get report via URL

I am trying to access a report on a new install of ReportServer via a url and cannot get past error 404.

The url I am trying is (assuming the ID is the number that appears on the top of the report edit screen in ReportServer but could not find any documentation on this):

http://<myserver>/reportserver/reportexport?id=63&format=html
http://<myserver>/reportserver/reportexport?key=SimpleCRTest&format=html

and the server responds with:

HTTP Status 404 - /reportserver/reportexport

I have tried using key=<my reports key> and get the same response.  I can access the login screen with the same link just using:

http://<myserver>/reportserver

The Admin documentation says there should be a "reportserverbasedir" before /reportserver, but does not show anything in the examples as to what that path might be, so I have no idea what I am missing or what "reportserverbasedir" should be if it is needed.

Any help would be appreciated,
Ed

Offline

#2 2015-08-03 18:37:39

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Unable to get report via URL

Hi Ed and welcome to the forum.

Could you try adding an extra /reportserver? That is

http://<myserver>/reportserver/reportserver/reportexport?id=63&format=html

Cheers,
Arno

Offline

#3 2015-08-03 18:39:36

mongonv
Member
Registered: 2015-07-31

Re: Unable to get report via URL

That was it!!

Thanks much for the quick reply Arno smile

Offline

#4 2015-08-03 18:59:24

mongonv
Member
Registered: 2015-07-31

Re: Unable to get report via URL

Hey Arno,
Followup question, I am trying to setup the export of a report without login and it does not seem to be working.

The changes I mage to the httpauthexecute.cf are:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <servlet>
   <httpauthexecute>
      <username>[myuser]</username>
      <password>[my password]</password>
      <registered>
        <ids>63</ids>
        <keys>SimpleCRTest</keys>
      </registered>
      <executeuser>
         <id/>
      </executeuser>
   </httpauthexecute>
  </servlet>
</configuration>

I have entered that, applied it, and it still asks for a login on running from a url.  Do I have to restart the server to get that picked up or is there something else I am missing?

2nd question, is there a way to allow all reports to be exported without login?  It would be pretty annoying to have to add every report to that list for sites that have hundreds of reports available to users, we plan to call the reports from our app in browser windows for each report.

Thanks,
Ed

Offline

#5 2015-08-03 19:37:13

Thorsten J. Krause
datenwerke
Registered: 2012-02-15
Website

Re: Unable to get report via URL

Hi Ed,

First question is easy: For the new configuration to take effect, you have to reload the config cache. For this open the ReportServer Terminal: In your browser press ctrl+alt+t, then type "config reload". The config as well as the admin guide should have some more info on the terminal.

Second question: As far as I know there is currently no alternative to listing all reports seperately, but maybe there is a workaround. I'll see what we can come up with and let you know.

Cheers,
Thorsten

Offline

#6 2015-08-03 19:51:58

mongonv
Member
Registered: 2015-07-31

Re: Unable to get report via URL

Hey Thorsten,
Thanks for the quick response, but it still asks for the login is required after doing the config reload.  I do get a confirmation that the reload happened in the terminal window, but after doing the reload it still prompts for the user login if using the ID or KEY values as the parameter on the url.

Thoughts on what to check?

Another item that just happened in playing around, I set up a scheduled job that I wanted to run in just a couple minutes so set the "All 1 days" value to "0" and now the scheduler throws a division by zero error when ever that job is clicked on, so it won't run and I can't get rid of it.  How can I kill that job to re move it from the server?

Thanks much,
Ed

Offline

#7 2015-08-03 20:53:13

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Unable to get report via URL

Hey Ed,

wow .. that is a bumpy start you are having. Sorry for this.

For the first one. Which URL are you using? For the httpauthexecute to take any effect you need to use the "httpauthexport" servlet instead of the "reportexport" servlet. That is,

http://<myserver>/reportserver/reportserver/httpauthexport?id=63&format=html

For the scheduler problem you can try the following. If you go to the terminal and call

scheduler list

this should give you a list of all active scheduler jobs. You can remove a job by calling

scheduler remove ID

where ID is the job's id.

As for the divide by 0, I've added a bug report.

Cheers
-Arno

Offline

#8 2015-08-03 21:16:58

mongonv
Member
Registered: 2015-07-31

Re: Unable to get report via URL

Hey Arno,
Yeah its always fun getting into a new app, always find stuff.

Tried the httpauthexport on both a id and key and it still requires a login.  The links I am using are:

http://<myserver>/reportserver/reportserver/httpauthexport?id=63&format=pdf
http://<myserver>/reportserver/reportserver/httpauthexport?key=SimpleCRTest&format=pdf

The user I login with is the same one I have in the config file (and both work if I log in when prompted):

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <servlet>
   <httpauthexecute>
      <username>[myuser]</username>
      <password>[mypassword]</password>
      <registered>
        <ids>63</ids>
        <keys>SimpleCRTest</keys>
      </registered>
      <executeuser>
        <id>3</id>
      </executeuser>
   </httpauthexecute>
  </servlet>
</configuration>

I know I have to be missing something, just can't figure out what it might be.

Have noted the method for killing a scheduler job, that will be helpful at some point for sure.

Thanks,
Ed

Offline

#9 2015-08-04 07:06:11

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Unable to get report via URL

Hi Ed,

sorry, I forgot to mention this. The user and password in the configuration need to be added to the url (and do not have to match the user's id with which the report is actually run). That is, if you defined username: user and password: pwd then the URL needs to be

http://<myserver>/reportserver/reportserver/httpauthexport?id=63&format=pdf&user=user&password=pwd

The idea is that in the file you specify a "bogus" user and password that can be used within the URL but does not give away an actual username and password which may allow someone to login. Since a report always needs to be run with a specific user (for example, if a report uses a user variable) you additionally need to specify the ID of the user with which the report is to be run.

Cheers
-Arno

Offline

#10 2015-08-04 17:20:59

mongonv
Member
Registered: 2015-07-31

Re: Unable to get report via URL

Hey Arno,
That worked, so we are on our way.
Thanks much for your assistance

Offline

Board footer

Powered by FluxBB