0

I'm developing a c# webservice that needs to use a .rec file (a recognizer, check the PS) in order to recognize written characters and return a string.

There is a method given in a dll, it's :

void ICR_SelectRecognizer(int Session, string RecFile);

the string is the RecFile's path. This function doesn't seem to find the .rec file eventhough the path is correct :

ICR_SelectRecognizer(Session, Server.MapPath("~/eurodigit.rec"));

How can I fix this?

PS

  1. From the recogniform web site: Platform: the engine is packaged in DLL format. For each content type (American Digit, European Digits, Uppercase Alpha, Lowercase Alpha, Mixed Alpha, etc...) is required a separate .REC file. The full engine size is less than 5 MB.

  2. Everything seems to work just fine when i use a windows form, but the web service always returns a null string, i take it as the web service doesn't find the recognizer?

  • Welcome! Please don't type in one large paragraph. I have tidied it for you. Wishing you well –  Aug 17 '17 at 14:19
  • Did you set the file's property to be Compile: _none_; Copy: _always_? –  Aug 17 '17 at 14:21
  • See this : https://stackoverflow.com/questions/236166/how-do-i-get-the-current-directory-in-a-web-service - you can also use the debugger to check the path. – PaulF Aug 17 '17 at 14:21
  • Assuming the web service is hosted in IIS, does the IIS configured [app pool identity](https://learn.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities) have the necessary permissions to read your .rec file ? – Subbu Aug 17 '17 at 15:01
  • @MickyD Yes, still doesn't work – Abdelhamid Belkarda Aug 17 '17 at 15:53
  • @Subbu I just installed the IIS manager after i read your reply and the defaultAppPool shows the error message "Application pools cannot be started unless the windows activation service (was) is running". – Abdelhamid Belkarda Aug 17 '17 at 15:55
  • @Subbu I fixed the ISS Pool problem, i gave the ISS APPPOOL/DefaultAppPool the permission to read, yet it's still not working – Abdelhamid Belkarda Aug 17 '17 at 17:55

0 Answers0