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 :)
- The base class includes the field ‘XXX’, but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer
- Dynamic Pivot With Out Aggregation Function
- Saving Table Changes is not permitted in Management Studio
- How I can comment / uncomment my code from ToolBar in VS 2012
- Can not Rename a SQL Server Database from SQL Server Management Studio
Top Posts & Pages
- ASP.Net (11)
- Errors (27)
- General (3)
- Microsoft Project Server 2010 (1)
- SharePoint 2010 (72)
- SharePoint 2013 (12)
- SQL Server (8)
- SSRS Reporting Services (1)
- Visual Studio (1)