The request failed with HTTP status 401: Unauthorized. Reporting Service ReportViewer (SharePoint Web Part)
I tried to use Reporting service Report Viewer that connect to Report Server remottly in custom web part in SharePoint.
I tried to create test ASP.Net Web Site solution with the same code and my surprise it’s worked successfully but in web part not worked :(
I decided to check Authentication of SharePoint Site Start–> Administrative Tools –> IIS Manager then navigate to my SharePoint site then select Authentication .
At ASP.Net Impersonate it’s Enabled
When I set Asp.Net Impersonate to false it’s worked successfully :)
Unfortunately Over two hour I tried to use Search but not worked i try to run full crawl search from central administration but also not worked :(
I decided to check Crawl Log and found the following error
error hresult fail has been returned from a call to a com component
I ask my self what’s the changes i do and went back to Enable Asp.Net Impersonate , and tried to run Full Crawl search and the error disappeared and search Work Successfully
but the main error back again :)
The request failed with HTTP status 401: Unauthorized.
I decided to disable Asp.Net Impersonate at the moment that I show my report So i will disable it via the following code in my web part
public System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = System.Security.Principal.WindowsIdentity.Impersonate(System.IntPtr.Zero);
//Insert your code that runs under the security context of the authenticating user here.
Good Luck :)
- SSRS Native Report Render Issue in SharePoint Server 2013 with IE 10 or later
- How you can show Multi Value Field in MSP_EpmProject_Userview as one filed ?
- Show Data Bar Chart From RTL\LTR In SSRS Report
- Showing HTML\RTF formatted data in SSRS
- The report server cannot open a connection to the report server database
Top Posts & Pages
- ASP.Net (11)
- Errors (41)
- General (3)
- Project Server (3)
- SharePoint 2010 (81)
- SharePoint 2013 (25)
- SQL Server (15)
- SSRS Reporting Services (8)
- Visual Studio (2)