Hi Team,
We are having a requirement to processing an Image (64KB,128KB or1 1MB..etc..) through webApi call but we are getting an error "Invalid URI: The Uri string is too long.",
then we referred the below URL:
https://www.c-sharpcorner.com/article/execute-fetchxml-with-webapi-in-dynamics-365-using-javascript/
After tried the above URL approach even though we are getting same below error message.
Now, 64KB image is converted to base64 format and the length of the characters 282000.
We came to know from blog only support limited characters, curently URI string only supports 32768 characters and as the UCI uses a batch,
Referred blog:
https://community.dynamics.com/365/f/dynamics-365-general-forum/389706/invalid-uri-the-uri-string-is-too-long-issue-while-retrieve-data-using-fetchxml-and-batch-request
We need to achieve the functionality through WebApi call by using fetch XML .. Please anyone can suggest how do we achieve this functionality.
Error Message:
{"Message":"Invalid URI: The Uri string is too long.","ExceptionMessage":"Invalid URI: The Uri string is too long.","ExceptionType":"Microsoft.Crm.CrmHttpException","StackTrace":" at Microsoft.Crm.Extensibility.OData.CrmODataBatchHandler.<ParseBatchRequestsAsyncImplementationAsync>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataBatchHandler.<>c__DisplayClass9_0.<<ParseBatchRequestsAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataBatchHandler.<ParseBatchRequestsAsync>d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.OData.Batch.DefaultODataBatchHandler.<ProcessBatchAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Batch.HttpBatchHandler.<SendAsync>d__0.MoveNext()","ErrorCode":"0x0"}