I am trying to extract document information using below SDK method, which keep throwing me 404 exception, i have tried different SDK versions, but they all throwing same exception.
When I am calling the same endpoint ("http://172.16.18.154:5000/formrecognizer/documentModels/prebuilt-idDocument:analyze?api-version=2022-08-31") using postman or using HTTPClient it works fine and returns 202 response code
Source Code
var credential = new AzureKeyCredential(_APIKey);
var client = new FormRecognizerClient(new Uri("http://172.16.18.154:5000/formrecognizer/documentModels/prebuilt-idDocument:analyze?api-version=2022-08-31";), credential);
RecognizeIdentityDocumentsOperation operation = client.StartRecognizeIdentityDocumentsFromUri(new Uri("https://www.navconsulting.net/images/awards/digital-banker-award.jpg"));
Response<RecognizedFormCollection> operationResponse = await operation.WaitForCompletionAsync();
Response
{"Status":404,"ErrorCode":null,"ClassName":"Azure.RequestFailedException","Message":"Service request failed.\r\nStatus: 404 (Not Found)\r\n\r\nHeaders:\r\nDate: Wed, 28 Feb 2024 14:31:06 GMT\r\nServer: Kestrel\r\nContent-Length: 0\r\n","Data":{},"InnerException":null,"HelpURL":null,"StackTraceString":" at Azure.AI.FormRecognizer.FormRecognizerRestClient.AnalyzeIdDocumentAsync(Nullable1 includeTextDetails, IEnumerable
1 pages, SourcePath fileStream, CancellationToken cancellationToken)\r\n at Azure.AI.FormRecognizer.FormRecognizerClient.StartRecognizeIdentityDocumentsFromUri(Uri identityDocumentUri, RecognizeIdentityDocumentsOptions recognizeIdentityDocumentsOptions, CancellationToken cancellationToken)\r\n at NAVRTA.API.Activity.Controllers.OCRController.AnalyzeId(Stream streamDocument) in D:\GitDev\NAVRTA\NAVRTA API\NAVRTA API\NAVRTA.WebApi.Activity\Controllers\OCRController.cs:line 119","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2146233088,"Source":"Azure.AI.FormRecognizer","WatsonBuckets":null}