Hello,
I’m trying to download a file from an internal SharePoint folder while using UiPathTeam.SharePoint.Activities v1.3.0. I have used a SP Scope to authenticate, however, the Client Context is empty. I’m using my own credentials. I can upload a file, however, there is an error from UiPath saying error 404.
I get the below error when using the ‘Get File’ activity. I do not see any files downloaded after I get this error.
Error:
RemoteException wrapping System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at UiPathTeam.SharePoint.Utils.GetFileByUrl(ClientContext clientContext, String relativeUrl)
at UiPathTeam.SharePoint.Utils.GetFileFromSharePoint(ClientContext clientContext, String localPath, String relativeUrl)
at UiPathTeam.SharePoint.Activities.Libraries.GetFile.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I tried using an ‘Upload File’ activity and it successfully uploaded a file. However, I get the below error. It says the server is not found, but once I refresh the SP site, the file has been uploaded.
Error:
RemoteException wrapping System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at UiPathTeam.SharePoint.Utils.UploadFile(ClientContext clientContext, String url, String localPath, Dictionary`2 itemProperties, Boolean allowOverwrite, Boolean queryInBatch)
at UiPathTeam.SharePoint.Activities.Libraries.UploadFile.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I don’t know why this is happening. I’ve followed the instruction manual and can not authenticate and populate the ClientContext, nor download a file.
Any help is appreciated.
Thanks,
Brad