Recently while working in a visual studio 2015 workflow for SharePoint online (Download PDF for FREE), I received the below error while running the workflow for a particular list item. The workflow went to a suspended mode and the error comes as:
An unhandled exception occurred during the execution of the workflow instance. Exception details: System.UriFormatException: Invalid URL: The format of the URI could not be determined. The error looks like below:
In the workflow, we were using HttpSend workflow activity to retrieve the URL of the RootWeb. In HttpSend I was using a variable to return the value form CurrentWebUri value (which returns the site URL).
My HttpSend Uri value looks like below:
The format of the URI could not be determined
Here the value which was coming in siteURL was like below:
https://onlysharepoint2013.sharepoint.com/sites/Bhawana (without “/” at the end)
So my HttpSend Uri was becoming like below:
https://onlysharepoint2013.sharepoint.com/sites/Bhawana_api/Site/RootWeb (missing “/” before _api)
So I changed my HttpSend Uri value to like below
Now it generates the URL correctly like below:
Read some SharePoint online tutorials:
- How copy items from one list to another list using csom .Net managed object model code in SharePoint online?
- How to add lookup column programmatically using csom in SharePoint online Office 365?
- SharePoint 2016 supported browsers and browser supported in SharePoint Online and SharePoint 2013
Hope this SharePoint tutorial helps to resolve the issue An unhandled exception occurred during the execution of the workflow instance. The format of the URI could not be determined.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)