Report Server has encountered a SharePoint error in SharePoint 2013
Report Server has encountered a SharePoint error. ---> Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: The user does not exist or is not unique. ---> System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors in SharePoint 2013
This error is occurring because of Anonymous access to the Microsoft Reporting Services. According to the Microsoft, Microsoft Reporting Service does not support anonymous access for integrated mode.
Ref: https://msdn.microsoft.com/en-us/library/bb283324.aspx#Anchor_4
https://lh3.googleusercontent.com/-ToLKaBn92ho/VvjKpduMyHI/AAAAAAAAMI4/fngDwNzzZPQ/image_thumb%25255B2%25255D.png?imgmax=800
So you might be wondering how you can achieve this.
Option One
You can disable anonymous access from IIS. But this won't work if you really want anonymous access in your farm. For example, if you are hosting an internet site with integration mode public reports you cannot disable the anonymous access.
https://lh3.googleusercontent.com/-p3rHDBi7gAI/VvjKqZJnz_I/AAAAAAAAMJA/a_l6L840Fa8/image_thumb%25255B4%25255D.png?imgmax=800
https://lh3.googleusercontent.com/-YBmSRctd3i4/VvjKrIG9hnI/AAAAAAAAMJI/Rp26sNK38YQ/image_thumb%25255B6%25255D.png?imgmax=800
Option Two
This is a smart workaround that you can do. In SharePoint reports that are rendering using aspx call RSViewerPage.aspx which resides in 15 hive.
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ReportServer\RSViewerPage.aspx
So these are the steps:
- Create a New Web Application to host your public reports.
- Copy RSViewerPage.aspx page and paste it as RSViewerPagePublic.aspx (You can use any name)
- Open the file and register a Control Template which handles the login for the anonymous users. We are going to implement that it will auto login to some user account for anonymous users.
In that case report server will see it is as an authenticated user and we are just using a dummy user login to represent the anonymous user.
Since it is a different web application it won't conflict with your content web application user.
<%@ Register TagPrefix="RSWP" Namespace="Microsoft.ReportingServices.SharePoint.UI.WebParts" Assembly="Microsoft.ReportingServices.SharePoint.UI.WebParts,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="code" TagName="AutoLogin" src="~/_controltemplates/15/Code/AutoGuestLogin.ascx" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Page language="C#" Codebehind="RSViewerPage.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ReportingServices.SharePoint.UI.RSViewerPage,Microsoft.ReportingServices.SharePoint.UI.ServerPages,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22>
<html dir="<%$Resources:wss,multipages_direction_dir_value%>" runat="server" style="overflow:hidden;width:100%;height:100%">
<head runat="server" lang="<%$Resources:wss,language_value%>">
- Creating the control template and a web part
You need to pass your user name and password in here and make an auto login.
- That refers to change the report view URL to point to your created aspx: