Vb.net SSIS脚本任务错误-授予用户的权限';NT授权\网络服务';不足以执行此操作
NT Authority\Network Service没有足够的权限执行SSIS控制流VB.net脚本任务中的某些代码,我遇到问题。它在debug中完美地执行,但当我创建作业代理来执行它时,我收到以下有关网络服务权限的错误:Vb.net SSIS脚本任务错误-授予用户的权限';NT授权\网络服务';不足以执行此操作,vb.net,reporting-services,ssis,Vb.net,Reporting Services,Ssis,NT Authority\Network Service没有足够的权限执行SSIS控制流VB.net脚本任务中的某些代码,我遇到问题。它在debug中完美地执行,但当我创建作业代理来执行它时,我收到以下有关网络服务权限的错误: 10/23/2015 15:36:59,Guest Satisfaction Subscriptions,Error,1,DILBERT,Guest Satisfaction Subscriptions,Guest Satisfaction Subscriptions,,
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
10/23/2015 15:36:59,客户满意度订阅,错误,1,DILBERT,客户满意度订阅,客户满意度订阅,以用户身份执行:TAYLORS\DILBERT$。Microsoft(R)SQL Server执行软件包实用程序版本10.50.2500.0,64位版权所有(C)Microsoft Corporation 2010。版权所有。开始:下午3:36:59错误:2015-10-23 15:37:03.37代码:0x00000001来源:生成和保存报告说明:System.Reflection.TargetInvocationException:调用的目标已引发异常。-->System.Web.Services.Protocols.SoapException:System.Web.Services.Protocols.SoapException:授予用户“NT授权\网络服务”的权限不足以执行此操作。-->Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException:授予用户“NT授权\网络服务”的权限不足以执行此操作。在Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(字符串报告字符串HistoryID ExecutionInfo2和executionInfo)在Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(字符串报告字符串HistoryID executionInfo和executionInfo)上位于System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage消息WebResponse响应流responseStream responseStream responseStream Boolean asyncCall)的System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName对象[]参数)ST_0378b6554b714d23a0b9474d41ce618e.vbproj.ReportServer.ReportExecutionService.LoadReport(字符串报告字符串HistoryID)ST_0378b6554b714d23a0b9474d41ce618e.vbproj.ScriptMain.Main()---内部异常堆栈跟踪的结尾----at System.RuntimeMethodHandle.\u调用MethodFast(对象目标对象[]在System.Reflection.RuntimeMethodInfo.Invoke(Object obj BindingFlags invokeAttr Binder Object[]parameters CultureInfo culture Boolean skipVisibilityChecks)中的System.Reflection.RuntimeMethodInfo.Invoke(Object obj BindingFlags invokeAttr Binder Object[]parameters CultureInfo culture Boolean skipVisibilityChecks)中的参数Signature Met(System.RuntimeType.InvokeMber处的对象obj BindingFlags invokeAttr Binder Binder对象[]参数CultureInfo区域性)(字符串名称BindingFlags BindingFlags Binder对象[]提供的参数修改器[]修饰符CultureInfo区域性字符串[]名称参数)在Microsoft.SqlServer.Dts.Tasks.ScriptTask.VStatasksscriptingEngine.ExecuteScript()结束错误DTExec:包执行返回DTSER_失败(1)。开始时间:下午3:36:59完成时间:下午3:37:03经过时间:4.29秒。包执行失败。步骤失败,00:00:04,0,0,,,0
2015年10月23日15:36:00,来宾满意度订阅,错误,0,DILBERT,来宾满意度订阅,(作业结果),作业失败。该作业由用户TAYLORS\administrator调用。要运行的最后一步是步骤1(来宾满意度订阅)。,00:00:05,0,0,,,,,0
我查看了多个网站,发现了以下关于NT Authority\Network Service的讨论内容,因此我验证了在我们的系统中发现的内容:
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
objParams(0)=objParamSelect
objParams(1)=objParamUnitID
'定义要在报表服务器上运行SSRS报表的所有内容
带objRSExec
.Credentials=System.Net.CredentialCache.DefaultCredentials
.Url=”http:///ReportServer/ReportExecution2005.asmx"
.LoadReport(“/”,无内容)
.SetExecutionParameters(对象参数,“en-us”)
objResult=.Render(strFileType,Nothing,strFileExtension,Nothing,Nothing,Nothing,Nothing,Nothing)
以
objStream=File.Create(strFullPathName,objResult.Length)
带objStream
.Write(objResult,0,objResult.Length)
.Close()
以
使用上面的代码,我试图通过调用报表服务器URL来执行SSRS报表。该代码在调试模式下似乎运行良好,但在从作业代理执行时,我缺少一些权限。非常感谢您的帮助。谢谢您抽出时间!为了防止其他人遇到同样的问题,我想这是我自己问题的答案。尽管我在ReportingServices网站上提供了完全控制的“主”文件夹,但它并没有进入包含SSRS报告的单个文件夹。当我在该文件夹的“安全性”中添加“网络服务”并为其提供简单的“浏览器”权限时,修复了该错误