OpenALPR .Net Library with MVC Project

1,154 views
Skip to first unread message

FRECIN FRANCIS

unread,
Oct 8, 2015, 12:09:31 AM10/8/15
to OpenALPR
Hi,


I am working on a MVC 4 application (Not a windows application). i would like to use openalpr .net library on it. But when i refer the openalpr-net.dll assembly, getting an error showing "

Could not load file or assembly 'openalpr-net.DLL' or one of its dependencies. The specified module could not be found". I have copied all dlls along with runtime_data and config file in my output directory and spent a lot of days with this, but couldn't get any solution. This is a very important feature i need in my service application. Anyone please help me on this and let me know what i am missing ?.




OpenalprDlls.PNG

Matt

unread,
Oct 15, 2015, 1:17:28 PM10/15/15
to OpenALPR
This could be a lot of things.  Most commonly it's a 32 bit/64 bit mismatch (i.e., you're using the 64 bit OpenALPR binaries on a 64 bit machine, but you're compiling your .NET binary in 32-bit mode).

Scott Barton

unread,
Oct 23, 2015, 2:00:25 PM10/23/15
to OpenALPR
Frecin, Did you ever get this to work? I am having the same issue with MVC. Worked fine in console and forms app but MVC cannot find the config files.

FRECIN FRANCIS

unread,
Oct 24, 2015, 2:00:59 AM10/24/15
to OpenALPR
Hi Scott,

Nope. I am trying my best to get this work with MVC becase this is a best among all other ALPR libraries out there . But no luck. Me too find it worked really well with console and windows forms application but not with any web application. I have already tried with 32 and 64 bit binaries and set the path in openalpr config file. But still getting the same error message.

Matt

unread,
Oct 24, 2015, 10:44:34 PM10/24/15
to OpenALPR
Do you have all of the OpenALPR DLLs and runtime data in the same folder as your .NET program?  Does alpr.exe run properly from that directory?  What error message do you see?  Are you compiling your .NET program as a 32-bit or 64-bit program?  Here's a good article with some additional background information about 64 vs 32 bit compiling in .NET:

FRECIN FRANCIS

unread,
Oct 25, 2015, 1:56:33 AM10/25/15
to OpenALPR
Hi Matt,

        Yes i have copied all openalpr 64 bit DLLs in the same bin directory of my web application. Screenshots attached here. There are no error messages and i can run the alpr.exe program from that directory. And i am compiling my application as a 64-bit. Please advise.




runtime config path

Auto Generated Inline Image 1
Auto Generated Inline Image 2

Matt

unread,
Oct 25, 2015, 12:27:10 PM10/25/15
to OpenALPR
Perhaps because it is a web application, the working dir may be different.  Try putting it in another location (such as the global system32 dir)  Here's a stack overflow article that may help:

-

Curtis DeHaven

unread,
Nov 25, 2015, 6:35:09 PM11/25/15
to OpenALPR
I too am able to run the OpenALPR as a console app under dot-net.  When I go to asp.net on my dev box, I found through procmon that it was looking in some iisexpress folder - I copied the dlls into that folder and it came right up.  I can run OpenALPR under asp.net in a dev environment - VS 2015.

But when I put the web site onto a 2008 test server with dot-net 4.0, I keep getting that annoying fail to load or one of its dependcies error...

I see in procmon that its at some point looking for openalpr-net.ini  -  I don't have one of those.  Might it be possible to define exactly where the other dlls are in an ini file?

Curt

Ciprian Mocanu

unread,
May 9, 2016, 9:27:33 AM5/9/16
to OpenALPR
I'm in an situation just like this, although I managed to run by web application locally by placing : liblept170, opencv_ffmpeg300_64, opencv_world300 in a separate folder and adding the folder to the system variables Path, but when I'm a publishing the application to a windows server with iis8.5 the same error message reappears. I would be great to find out if somebody found a solution to this.

Mwesigye john bosco

unread,
May 16, 2016, 5:36:42 AM5/16/16
to OpenALPR
did you install visual studio runtime environment? it is shipped in the precompiled release. try it out may be!!

Konstantin M

unread,
Mar 10, 2017, 1:21:36 AM3/10/17
to OpenALPR
Has anyone been able to resolve this issue yet? I've also successfully got OpenALPR runnin gin a console app, but not in my ASP.NET MVC app.

Kevin Jensen

unread,
Mar 10, 2017, 2:58:15 PM3/10/17
to OpenALPR
Hi Konstantin M

I've been working a long time on this issue aswell, and I have finally found the answers, in fact I made a whole Github about it! Check it out and feel free to come with feedback!

Reply all
Reply to author
Forward
0 new messages