加载中…
个人资料
FelixWang
FelixWang
  • 博客等级:
  • 博客积分:0
  • 博客访问:18,318
  • 关注人气:1
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
正文 字体大小:

Error:"The request failed with HTTP status 401: Unauthorized."Report Services,SharePoint

(2011-11-30 17:35:13)
标签:

report

server

service

sharepoint

integration

杂谈

分类: ReportService

Error: "The request failed with HTTP status 401: Unauthorized" in Report Services 2008 Sharepoint Integration 

 

Environment: Windows Server 2008 R2; SQL Server 2008 R2 Report Service SharePoint Integration Mode; C#; ASP.NET

 

Situation: C# code

ReportViewer.Reset();

ReportViewer.ProcessingMode = ProcessingMode.Remote;
ReportViewer.ShowParameterPrompts = false;
ServerReport serverReport = ReportViewer.ServerReport;
serverReport.ReportServerUrl = new Uri(System.Configuration.ConfigurationSettings.AppSettings["ReportServerURL"].ToString());
                //ReportViewer.ServerReport.ReportServerCredentials.GetFormsCredentials(null, "username", "password", "domain");
 serverReport.ReportServerCredentials = new SWPrediction.UI.ReportServerCredentials(System.Configuration.ConfigurationSettings.AppSettings["ReportUserName"].ToString(), System.Configuration.ConfigurationSettings.AppSettings["ReportPassword"].ToString(), "");

serverReport.ReportPath = System.Configuration.ConfigurationSettings.AppSettings["***"].ToString();

...

serverReport.SetParameters(reportParam);

ERROR THROW!

 

Solution:

Sharepoint setup uses NTLM authentication only, therefore Reporting Services must be configured for the same authentication type as well.

  1. On the Reporting Services Server, open the config file rsreportserver.config (you find it in the Reporting Services folder "C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config")
  2. Look for the Autentication configuration node
  3. Remove the RSWindowsNegotiate setting

The config section in question should now look like this:

1 <Authentication>
2   <AuthenticationTypes>
3     <!-- <RSWindowsNegotiate/> -->
4     <RSWindowsNTLM/>
5   </AuthenticationTypes>
6   <EnableAuthPersistence>true</EnableAuthPersistence>
7 </Autentication>

That way, only NTLM is used for authentication.

 

Reference: http://adrianhenke.wordpress.com/2009/06/13/the-request-failed-with-http-status-401-unauthorized-in-report-services-2008-sharepoint-integration/

0

阅读 评论 收藏 转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有