Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielsbezerra opened this issue Dec 4, 2019 · 3 comments
Open

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

danielsbezerra opened this issue Dec 4, 2019 · 3 comments

Comments

@danielsbezerra
Copy link

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants