I am trying to solve an issue with the Report Viewer control displaying the message:
The request failed with HTTP status 401: Unauthorized.
rather than a report. This message is shown in the location where the report would be displayed. The Share Point parts of the page are displayed normally.
This occurs in a Report Viewer control on a SharePoint 2013 page.
Some other reports on other pages show up just fine. In Report Server, the browsing permissions on these reports are the same.
A testing environment with the same configuration is working correctly. I could not find any differences in the web.config on the web server and in the RSReportServer.config file on the report server.
I http traffic from my browser, using the Network tab in the IE developer tools and saw something remarkable. POST Requests from javascript to the report server control are like:
/Reserved.ReportViewerWebControl.axd?OpType=SessionKeepAlive&ControlID=597f9e1be96e4291b847ce06da66940d
and receive a HTTP 500 status, whereas the response body is just two bytes:
OK
The report that works correctly, issues similar requests, but just receives HTTP 200 status, also with OK as response body.
On my testing environment, thing are different, again. The report issues three requests to ReportViewerWebControl.axd. The first get a HTTP 401 status. The next request adds an Authentication header with an NTLM token. This also gets an 401 status. The third adds another NTLM value and gets a 200 status.
This looks like some challenge mechanism and I found an MSDN article Error: The request failed with HTTP status 401: Unauthorized when you open a report in Microsoft Dynamics CRM 4.0 and tested with added to my RSReportServer.config file. This did not help and this key is also absent in my testing environment.
I also enabled FailedRequest logging to get more insight in the Internal server error, return by the requests to ReportViewerWebControl.axd. This logging is very elaborate, but I could not find anything pointing to a cause of this error.
Under request summary it reads
188. view trace
Warning -MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName ManagedPipelineHandler
Notification EXECUTE_REQUEST_HANDLER
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode The operation completed successfully. (0x0)
ConfigExceptionInfo
and under Authentication & Authorization
No. Event
60. view trace -AUTH_START AuthTypeSupported MapCliCert
61. view trace -AUTH_END
64. view trace -AUTH_START AuthTypeSupported Basic
65. view trace -AUTH_END
68. view trace -AUTH_START AuthTypeSupported NT
70. view trace -AUTH_END
91. view trace -FILTER_AUTH_COMPLETE_START
92. view trace -FILTER_AUTH_COMPLETE_END
I do not understand what all of that means, but it is the
ErrorCode The operation completed successfully.
looks like a contradiction.
Does anyone have suggestions on next steps to tackle this problem?