1

SQL Server Reporting Services 208 R2インスタンスへの参照を使用するASP.NET(v2.0)Webアプリケーションがあります(ReportService2010.asmxサービスエンドポイントを使用)。WebアプリケーションはServerAでホストされ、ReportingServicesインスタンスはServerBでホストされます。ServerAはWindowsServer2003(IIS6)を実行しており、ServerBはWindows Server2008R2を実行しています。

WebアプリケーションはWindows認証を使用するように構成されており、偽装がオンになっています。サーバーAでローカルに(リモートデスクトップ接続を使用して)Webアプリケーションを実行すると機能しますが、デスクトップマシン(Windows XP)から実行すると、次のエラーが発生します。

'/MyWebApp'アプリケーションのサーバーエラー。

リクエストはHTTPステータス401:Unauthorizedで失敗しました。説明:現在のWebリクエストの実行中に未処理の例外が発生しました。エラーとエラーがコードのどこで発生したかについての詳細は、スタックトレースを確認してください。

例外の詳細:System.Net.WebException:リクエストはHTTPステータス401:Unauthorizedで失敗しました。

ソースエラー:

現在のWebリクエストの実行中に、未処理の例外が生成されました。例外の発生源と場所に関する情報は、以下の例外スタックトレースを使用して識別できます。

スタックトレース:

[WebException:リクエストはHTTPステータス401:Unauthorizedで失敗しました。] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message、WebResponse response、Stream responseStream、Boolean asyncCall)+431289System.Web.Services.Protocols.SoapHttpClientProtocol
。 Invoke(String methodName、Object [] parameters)+204
ReportingServices.ReportingService2010.ListChildren(String ItemPath、Boolean Recursive)+81 Default.LoadReports()+54
Default.Page_Load(Object sender、EventArgs e)+224
System.Web.Util .CalliHelper.EventArgFunctionCaller(IntPtr fp、Object o、Object t、EventArgs e)+14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender、EventArgs e)+35 System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive()+50
System.Web.UI.Page.ProcessRequestMain(ブール値includeStagesBeforeAsyncPoint、ブール値includeStagesAfterAsyncPoint)+627


バージョン情報:Microsoft .NET Frameworkバージョン:2.0.50727.3634; ASP.NETバージョン:2.0.50727.3634

LoadReportsメソッド:

private void LoadReports()
{
    ReportingService2010 rService = new ReportingService2010();

    rService.Credentials = System.Net.CredentialCache.DefaultCredentials;
    CatalogItem[] catalogItems;
    catalogItems = rService.ListChildren(ReportPath, true);

    BuildTree(catalogItems);
}

ServerAのアプリケーションイベントログには、次の追加の詳細が含まれています。

Event Type: Warning
Event Source:   ASP.NET 2.0.50727.0
Event Category: Web Event 
Event ID:   1309
Date:       28/06/2012
Time:       11:25:16
User:       N/A
Computer:   ServerA
Description:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 28/06/2012 11:25:16 
Event time (UTC): 28/06/2012 10:25:16 
Event ID: 11f6bec3e91045229f4e34a5d2de78e9 
Event sequence: 4 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1/Root/MyWebApp-1-129853527126453497 
    Trust level: Full 
    Application Virtual Path: /MyWebApp 
    Application Path: c:\inetpub\wwwroot\MyWebApp\ 
    Machine name: ServerA 

Process information: 
    Process ID: 1180 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
    Exception type: WebException 
    Exception message: The request failed with HTTP status 401: Unauthorized. 

Request information: 
    Request URL: http://ServerA/MyWebApp/Default.aspx 
    Request path: /MyWebApp/Default.aspx 
    User host address: 192.168.100.130 
    User: DOMAIN\mylogin 
    Is authenticated: True 
    Authentication Type: Negotiate 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

Thread information: 
    Thread ID: 1 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at ReportingServices.ReportingService2010.ListChildren(String ItemPath, Boolean Recursive)
   at Default.LoadReports()
   at Default.Page_Load(Object sender, EventArgs e)
   at System.Web.Util.CalliHe.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
4

1 に答える 1

4

認証委任を有効にする

Active Directory ユーザーとコンピューターの Microsoft 管理コンソール ([スタート] > [ファイル名を指定して実行] > [dsa.msc]) を使用して、ServerA サーバー エントリのプロパティを開きます。[委任] で、[任意のサービスへの委任に対してこのコンピューターを信頼する (Kerberos のみ)] を選択します。

SPN の構成

次のコマンドを使用して、サービス プリンシパル名 (SPN) を登録します。

setspn -S http/ServerB ReportingServicesServiceAccount
setspn -S http/ServerB.domain.com ReportingServicesServiceAccount

ReportingServicesServiceAccountServerB で Reporting Services サービスを実行するために使用されるサービス アカウントはどこにありますか。

于 2012-06-28T16:22:10.027 に答える