My ASP.NET App works fine if I debug or run it on my local IIS. But if I publish it onto an IIS, it looks like EmguCV looses the dlls it needs. The bin folder of my VS proje
I once had a similar issue, maybe this helps in your case: please check your IIS application pool settings and make sure that you enable 32 bit applications under "Advanced Settings".
Error shown when i tried to execute EmguCV on IIS - Unable to load DLL 'cvextern': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Exception - The type initializer for 'Emgu.CV.CvInvoke' threw an exception
.
In my case, I solved this by enabling UI Desktop experience for windows server (In my case - Windows Server 2012 R2) because Microsoft never enabled that feature on Windows Server by default.
Solution
For Windows Server 2008
For Windows Server 2012
Hope this solution can help you :)
Links - Solution from GitHub & Description with screenshot
Alright, after a lot of research and grey hair I finally convinced my boss to just use an Desktop PC to process images with EmguCV. The (quite obvious) reason for the exception was the missing nVidia Cuda GPU in the server.