2

I use Emgu in a WinForm and works fine, now I try to make a mvc.net project using emguCV but don't work, I have the error:

The type initializer for 'Emgu.CV.CvInvoke' threw an exception.

I try to use the solutions of THE OFFICIAL WEBSITE emguCV and I can't understand how make that for web, and implement the OpenCV librairies in IIS Express .

what is the correct way to use EmguCV in a web site?

berak
  • 39,159
  • 9
  • 91
  • 89
chefjuanpi
  • 1,570
  • 15
  • 27
  • 2
    I have no idea why this was downvoted. I am running into the exact same error. Emgu/openCV is exposed and working in a console app, but not an MVC site. I'm at a loss. (http://stackoverflow.com/questions/27070610/mvc-app-referencing-my-library-fails-at-runtime-but-my-console-app-referencing) – Brett Nov 22 '14 at 15:54

1 Answers1

1

ENGUCV works in the publish MVC project, the problem is in the development because it can't work with IIS express, but I find a way, use the local IIS of the machine.

turn on IIS if It's desactivated,

control panel / programs/activate Windows Components / IIS (exist many options to turn on)

run VS how admin

in the project properties select local IIS for debugging Properties / Web / Servers / Local IIS

and play!

for more options use the IIS console

control panel / Admin Tools / IIS

chefjuanpi
  • 1,570
  • 15
  • 27
  • No, it doesn't work in MVC project for me. I tried to publish it on our prod server with IIS. The same problem. – Ulad Melekh Jul 20 '15 at 20:29
  • works, you need copy all dlls in bin directory in the server, use visual studio how admin and attach the process to check what happends in the server – chefjuanpi Oct 23 '15 at 06:06