tobania / VSTS.Extension.SqlReportingServices

VSTS Extension for uploading SSRS Reports
MIT License
14 stars 20 forks source link

Access to the path 'C:\agent\xyz\drop\Aprov' is denied. #55

Open danielsbezerra opened 4 years ago

danielsbezerra commented 4 years ago

Hi guys, trying to deploy SSRS sln and getting this "access denied" message. Any help? Full control in "c:\agent" folder and subfolders.

2019-12-04T17:31:21.6643036Z ##[error]System.Management.Automation.MethodInvocationException: Exception calling "ReadAllBytes" with "1" argument(s): "Access to the path 'C:\agent_work\r1\a_BI-Concessao-ASP.NET-CI\drop\Aprovações' is denied." ---> System.UnauthorizedAccessException: Access to the path 'C:\agent_work\r1\a_BI-Concessao-ASP.NET-CI\drop\Aprovações' is denied. 2019-12-04T17:31:21.6685986Z ##[debug]Processed: ##vso[task.logissue type=error;]System.Management.Automation.MethodInvocationException: Exception calling "ReadAllBytes" with "1" argument(s): "Access to the path 'C:\agent_work\r1\a_BI-Concessao-ASP.NET-CI\drop\Aprovações' is denied." ---> System.UnauthorizedAccessException: Access to the path 'C:\agent_work\r1\a_BI-Concessao-ASP.NET-CI\drop\Aprovações' is denied. 2019-12-04T17:31:21.6686401Z at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 2019-12-04T17:31:21.6696572Z at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 2019-12-04T17:31:21.6697197Z at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 2019-12-04T17:31:21.6697365Z at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost) 2019-12-04T17:31:21.6698769Z at CallSite.Target(Closure , CallSite , RuntimeType , Object ) 2019-12-04T17:31:21.6699100Z --- End of inner exception stack trace --- 2019-12-04T17:31:21.6699394Z at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo) 2019-12-04T17:31:21.6699800Z at CallSite.Target(Closure , CallSite , RuntimeType , Object ) 2019-12-04T17:31:21.6699926Z at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) 2019-12-04T17:31:21.6700061Z at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) 2019-12-04T17:31:21.6700183Z at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2019-12-04T17:31:21.6700486Z Uploading report Aprovações to /homolog... 2019-12-04T17:31:21.6700612Z 2019-12-04T17:31:21.6700715Z 2019-12-04T17:31:21.6923929Z ##[error]Microsoft.PowerShell.Commands.WriteErrorException: System.Web.Services.Protocols.SoapException: The value for parameter 'Definition' is not specified. It is either missing from the function call, or it is set to null. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingParameterException: The value for parameter 'Definition' is not specified. It is either missing from the function call, or it is set to null. 2019-12-04T17:31:21.6924255Z ##[debug]Processed: ##vso[task.logissue type=error;]Microsoft.PowerShell.Commands.WriteErrorException: System.Web.Services.Protocols.SoapException: The value for parameter 'Definition' is not specified. It is either missing from the function call, or it is set to null. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingParameterException: The value for parameter 'Definition' is not specified. It is either missing from the function call, or it is set to null. 2019-12-04T17:31:21.6930129Z at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, ItemType ItemType, CatalogItem& ItemInfo, Warning[]& Warnings) 2019-12-04T17:31:21.6932149Z at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateCatalogItem(String ItemType, String Name, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, CatalogItem& ItemInfo, Warning[]& Warnings) 2019-12-04T17:31:21.6932341Z at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateCatalogItem(String ItemType, String Name, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, CatalogItem& ItemInfo, Warning[]& Warnings) 2019-12-04T17:31:21.7223740Z ##[error]PowerShell script completed with 2 errors. 2019-12-04T17:31:21.7236845Z ##[section]Finishing: Deploy SQL Server reporting files

ygeelen-tb commented 4 years ago

Hello,

Can you check which user your Azure DevOps agent Windows Service is running under? And if this user has permissions to the folder C:\agent_work\r1\a_BI-Concessao-ASP.NET-CI\drop\Aprovações ?

Perhaps PowerShell doesn't understand the special characters çõ ?

Kind regards, Y.

danielsbezerra commented 4 years ago

Thanks @ygeelen-tb

Azure Devops agent is running under Administrator user. Failure seems to happen uploading files to Power BI Reporting Server. Agent is running in the same server as PBIRS.

I've tried a different user (my own, which is Adm) and also removed the special characters. Error still there.

ygeelen-tb commented 4 years ago

Are you sure the task is being runned on the machine where this path exists?