I have Aspose.OCR working well in my development environment, but when I publish to a staging server for further testing I am having issues.
The exception being triggered is: The type initializer for ' ’ threw an exception.
This occurs on the call to RecognizeImage(filePath) when trying to OCR a JPG file.
This occurs on the call to RecognizePdf(filePath) when trying to OCR a PDF file.
The basic environment details are:
- The solution is deployed as a website, using ASPX.
- The target .NET Framework is 4.8.
- The development environment is Visual Studio 2022
- The staging server is hosted by Azure using Windows with IIS.
There is obviously some difference between my development environment and the staging environment. It could be the way the servers, application pools or websites are setup. It is probably an environmental issue, rather than a problem with the Aspose.OCR library itself.
To help me isolate the likely cause, can you advise:
- What type of Object is being initialized at the time of the call?
- What other libraries are being used?
- Are there any IIS/Application Pool settings that should be checked?
- Are there any web.config settings that should be applied?
- Are there any permission settings that need to be checked?
Thanks in advance for your assistance!
Jonathan