2015-10-27 93 views
0

我遇到NT Authority \ Network Service沒有足夠權限來執行我的SSIS控件中的某些代碼的問題流VB.net腳本任務。它完美地執行中調試,但是當我創建一個作業代理執行它,我收到了有關網絡服務的權限以下錯誤:SSIS腳本任務錯誤 - 授予用戶'NT AUTHORITY NETWORK SERVICE'的權限不足以執行此操作

10/23/2015 15:36:59,Guest Satisfaction Subscriptions,Error,1,DILBERT,Guest Satisfaction Subscriptions,Guest Satisfaction Subscriptions,,Executed as user: TAYLORS\DILBERT$. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 3:36:59 PM Error: 2015-10-23 15:37:03.37  Code: 0x00000001  Source: Generate and Save Reports  Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation.  at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(String Report<c/> String HistoryID<c/> ExecutionInfo2& executionInfo)  at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report<c/> String HistoryID<c/> ExecutionInfo& executionInfo)  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message<c/> WebResponse response<c/> Stream responseStream<c/> Boolean asyncCall)  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName<c/> Object[] parameters)  at ST_0378b6554b714d23a0b9474d41ce618e.vbproj.ReportServer.ReportExecutionService.LoadReport(String Report<c/> String HistoryID)  at ST_0378b6554b714d23a0b9474d41ce618e.vbproj.ScriptMain.Main()  --- End of inner exception stack trace ---  at System.RuntimeMethodHandle._InvokeMethodFast(Object target<c/> Object[] arguments<c/> SignatureStruct& sig<c/> MethodAttributes methodAttributes<c/> RuntimeTypeHandle typeOwner)  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj<c/> BindingFlags invokeAttr<c/> Binder binder<c/> Object[] parameters<c/> CultureInfo culture<c/> Boolean skipVisibilityChecks)  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj<c/> BindingFlags invokeAttr<c/> Binder binder<c/> Object[] parameters<c/> CultureInfo culture)  at System.RuntimeType.InvokeMember(String name<c/> BindingFlags bindingFlags<c/> Binder binder<c/> Object target<c/> Object[] providedArgs<c/> ParameterModifier[] modifiers<c/> CultureInfo culture<c/> String[] namedParams)  at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript() End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 3:36:59 PM Finished: 3:37:03 PM Elapsed: 4.29 seconds. The package execution failed. The step failed.,00:00:04,0,0,,,,0 
10/23/2015 15:36:00,Guest Satisfaction Subscriptions,Error,0,DILBERT,Guest Satisfaction Subscriptions,(Job outcome),,The job failed. The Job was invoked by User TAYLORS\administrator. The last step to run was step 1 (Guest Satisfaction Subscriptions).,00:00:05,0,0,,,,0 

我看過多個網站,我已經找到了爲NT AUTHORITY \ Network服務下面討論,所以我驗證了我在我們的系統中發現:

  1. 在Reporting Services配置管理 - 服務帳戶設置爲「網絡服務」
  2. 報表服務器數據庫證書( ReportServer DB) - NT Authority \ Network Service被授予db_owner一個d RSExecRole
  3. URL站點設置 - NT AUTHORITY \ Network服務授權系統管理員和系統用戶(由我保證是沒有問題的)
  4. SQL Server的憑據(用戶映射) - NT AUTHORITY \網絡服務被授予的db_owner,大衆,RSExecRole爲Report Server數據庫

正試圖運行代碼的片段:

objParams(0) = objParamSelect 
objParams(1) = objParamUnitID 

'Define everything to run the SSRS report on the report server 
With objRSExec 
    .Credentials = System.Net.CredentialCache.DefaultCredentials 
    .Url = "http://<<Server>>/ReportServer/ReportExecution2005.asmx" 
    .LoadReport("/<<Report Name>>", Nothing) 
    .SetExecutionParameters(objParams, "en-us") 
    objResult = .Render(strFileType, Nothing, strFileExtension, Nothing, Nothing, Nothing, Nothing) 
End With 

objStream = File.Create(strFullPathName, objResult.Length) 
With objStream 
    .Write(objResult, 0, objResult.Length) 
    .Close() 
End With 

與上面的代碼,我試圖通過撥打我們的報告,執行SSRS報告服務器URL。該代碼似乎在調試模式下運行良好,但在從代理程序執行時缺少一些權限。任何幫助將不勝感激。感謝您的時間!

回答

1

爲了防止其他人有這個相同的問題,我想發佈答案,我自己的問題。儘管我在ReportingServices網站上提供了完整控制的「主頁」文件夾,但它並沒有流入包含SSRS報告的單個文件夾。當我在該文件夾中將「網絡服務」添加到「安全」併爲其提供簡單的「瀏覽器」權限時,修復了該錯誤。

相關問題