Click here to Skip to main content
15,885,216 members
Articles / Productivity Apps and Services / Sharepoint

Report Server has Encountered a SharePoint Error in SharePoint 2013

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
28 Mar 2016CPOL2 min read 6.8K  
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 is error occurring because of anonymous access to the Microsoft Reporting Services. According to Microsoft: Microsoft Reporting Service are not supporting anonymous access for integrated mode.

Reference: https://msdn.microsoft.com/en-us/library/bb283324.aspx#Anchor_4

image

So you might be wondering how you can achieve this.

Option One

Simply, you can disable the anonymous access from IIS. But this won't work if you really want anonymous access in your farm. For example, if you are hosting internet site with integration mode public reports, you cannot disable the anonymous access.

image

image

Option Two

This is a smart workaround that you can do. In Sharepoint reports are rendering using aspx called RSViewerPage.aspx which reside in 15 hive.

C:\Program Files\Common Files\Microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ReportServer\RSViewerPage.aspx

So, there 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 a some user account for anonymous users.

In that case, report server will see it 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.

XML
<%@ 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">
<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 auto login.

  • that refer change the report view url to point your created aspx:

http://data.com/_layouts/15/ReportServer/RSViewerPagePublic.aspx?rv:RelativeReportUrl=ActivityReport.rdl

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Sri Lanka Sri Lanka
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --