Recognition Engine Halted with Error Code:0

Feb 9, 2010 at 12:23 PM

Hello CodePlex Team,

I am using your Puma.Net application for reading the Text from the Image File.

I have downloaded the Puma.Net and installed in my machine.  When I'm using the Windows Application you have provided, the application is running perfectly.

I have created one Web Service.

In that I have given the reference of Puma.Net.interop.dll and Puma.Net.dll

When I'm trying to read a file from the Web Service I'm getting the 'Recognition Engine Halted with Error Code:0'

How can I get rid of this error ?

Can you please help me out.


Thanks in Advance,


Feb 9, 2010 at 12:45 PM

The error 'Recognition Engine Halted with Error Code:0' was discussed in other threads. This generally means that's something wrong with the image being recognized. Whether the images you use for Web Application are the same as for the desktop sample? I may also suggest you to check user permissions that the account under which your web application runs has. There were problems reported for COM recognition engine that can't work when the consuming application runs with restricted permissions (see If you don't cope with the problem get back me with the results and more detailed description of the problem.

Feb 9, 2010 at 12:56 PM

Thanks for your Quick Reply MaximSaplin.

1. I'm testing with Same Images with Windows Application you provided and the Web Services I have written.

  • For Windows App It is generating the Text successfully.
  • For my Web Service its failing
  • I have referenced the Dll in the Puma.Net/Bin/Debug/Puma.Net.dll   and Puma.interop.dll

2. I have given ' Full Control ' Permission to the Web Service Folder which is at Inetpub/wwwRoot/OCRWebServiceTest


Feb 9, 2010 at 1:04 PM

I think you should check permissions again and also set them to the folder where COM server resides (and check user account for the Web Application). If that doesn't work then the best thing I could do is to create a small web service on my own and check what's wrong.

Feb 10, 2010 at 7:26 AM

Thank you MaximSaplin,

Its worked when I have given the persmission to the COM Server Folder

Thank you Verymuch

I have One Question,

Suppose, if the Web Service is in My Machine, and if anyone wants to access it the Image should be in my Machine right ?

Instead of that, Can we send the Image File as an argument and can we return the file to the Application which it access ?

Can you guide me in this way




Feb 10, 2010 at 7:38 AM

Anand, I'm glad to help you.

What  about recognition via Web Service (.asmx or .svc) the general concept is sending an image as binary data to server, saving it to a temp file and recognizing via Puma.NET. The response is then sent as a binary data (recognized file). You may look through the following article ( to see how image can be transmitted to an .asmx service.

Regards, Maxim.

May 28, 2010 at 10:37 AM


Can you please be more specific about how you gave permissions and to what folder? I'm having the same problem using in a web application. I'd really appreciate your help.



May 28, 2010 at 12:31 PM


Go to the folder were you've installed Puma.NET and grant write access on the COM servers' folder to the account used by your application.

May 28, 2010 at 12:40 PM

Thanks Maxim for your response, but I already gave full-access to Everyone for the entire Puma.NET folder and still nothing happens. The thing is I managed about 2 months ago to make it work on my computer, but now I need to deploy the project on another one and just don't remember what the hell did I change to make it work. I even gave full-permissions in DCOM for everyone, but still doesn't work. I'm not sure in the registry if I should give permissions to a certain class. Can you think of another possible cause? The error is "The Puma.NET library not load".


May 28, 2010 at 3:05 PM

Puma.Net.dll assembly requires FullTrust permission set. Check this also. If the error still appear - waiting detailed exception description from you.

May 28, 2010 at 3:27 PM

I tried adding in web.config, under <system.web> a tag <trust level="Full" originUrl="" />, but still getting the same error. Is this what you meant about FullTrust? Sorry, I didn't had this problem with setting trust level for assembly until now. The error is when instantiating new PumaPage() and all it says is <0xFFFFFFFF>Library Puma.NET not load.


May 31, 2010 at 7:51 AM

The problem here was wit incorrect COM server registration. The path was invalid during registration.


Jan 4, 2011 at 1:21 AM


Thanks for your


Mar 23, 2011 at 1:52 PM

Workaround from other thread helped me!

Hi Maxim,

Thank you for the quick reply. 

I solved the problem for now by giving MODIFY permissions to "Authenticated Users" on the folder in which the supporting COM DLLs are located.

Hope it helps someone.

Best Regards