Unable to load 'VideoOS.DatabaseUtility.Common.DLL'

I have an Asp.Net MVC Web Api application that call some Milestone Corporate webservices. All works fine with MIP sdk 2016R3 but after upgrade MIP SDK to 2017 R1 the application does not works anymore with the following error (IIS application pool is 64 bit):

Impossibile caricare il file o l’assembly ‘VideoOS.DatabaseUtility.Common.DLL’ o una delle relative dipendenze. Impossibile trovare il modulo specificato.

[FileNotFoundException: Impossibile caricare il file o l’assembly ‘VideoOS.DatabaseUtility.Common.DLL’ o una delle relative dipendenze. Impossibile trovare il modulo specificato.] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17 System.Reflection.Assembly.Load(String assemblyString) +35 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +122 [ConfigurationErrorsException: Impossibile caricare il file o l’assembly ‘VideoOS.DatabaseUtility.Common.DLL’ o una delle relative dipendenze. Impossibile trovare il modulo specificato.] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +12495956 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +499 System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +131 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +331 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +148 System.Web.Compilation.BuildManager.ExecutePreAppStart() +172 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151 [HttpException (0x80004005): Impossibile caricare il file o l’assembly ‘VideoOS.DatabaseUtility.Common.DLL’ o una delle relative dipendenze. Impossibile trovare il modulo specificato.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12617668 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12457285

Have you replaced the dependent files when you upgraded? Removed the old and copied a new set of files from [C:\Program](file:C:/Program) Files\Milestone\MIPSDK\Bin ..

If not it would explain the issue.

I have investigated more this isssue and the problem was related to the Native C++ Library referenced by VideoOS.DatabaseUtility.Common.DLL and by VideoOS.DatabaseUtility.MediaStorage.dll and how IIS load the native library. This post http://stackoverflow.com/questions/7996263/how-do-i-get-iis-to-load-a-native-dll-referenced-by-my-wcf-service for IIS and this post http://stackoverflow.com/questions/24246547/ho-do-i-reference-native-files-in-iis-express for IIS express solved my problem.

Tank you.