AVIExporterClientMW.DLL Loading issues in IIS?

Hi everyone we have been trying to implement with Milestone for a few days and all the tests ive made on .net Form applications or even .net Console applications have worked without an issue, so when i tried to convert this over to a .net 4.7.2 or .net 4.8 .net web application, there seems to be some large issues with DLLs that i just cant seem to figure out. im stuck with the error page:

[FileNotFoundException: Could not load file or assembly ‘AVIExporterClientMW.DLL’ or one of its dependencies. The specified module could not be found.]

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) +232

System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113

System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23

System.Reflection.Assembly.Load(String assemblyString) +35

System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48

[ConfigurationErrorsException: Could not load file or assembly ‘AVIExporterClientMW.DLL’ or one of its dependencies. The specified module could not be found.]

System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +767

System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +256

System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +58

System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +287

System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +69

System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +137

System.Web.Compilation.BuildManager.ExecutePreAppStart() +172

System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +854

[HttpException (0x80004005): Could not load file or assembly ‘AVIExporterClientMW.DLL’ or one of its dependencies. The specified module could not be found.]

System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532

System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +719

I have these nuget packages installed for Milestone

MilestoneSystems.VideoOS.Platform version 23.2.1

MilestoneSystems.VideoOS.Platform.SDK version 23.2.1

The DLL is located in bin.

i know the bindings are loaded as i viewed it using Assembly Binding Log Viewer (FUSLOGVW)

Log:

*** Assembly Binder Log Entry (09/11/2023 @ 15.06.08) ***

The operation was successful.

Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from: [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll](file:C:/Windows/Microsoft.NET/Framework64/v4.0.30319/clr.dll)

Running under executable [C:\Program](file:C:/Program) Files\IIS Express\iisexpress.exe

-– A detailed error log follows.

=== Pre-bind state information ===

LOG: DisplayName = AVIExporterClientMW

(Partial)

WRN: Partial binding information was supplied for an assembly:

WRN: Assembly Name: AVIExporterClientMW | Domain ID: 2

WRN: A partial bind occurs when only part of the assembly display name is provided.

WRN: This might result in the binder loading an incorrect assembly.

WRN: It is recommended to provide a fully specified textual identity for the assembly,

WRN: that consists of the simple name, version, culture, and public key token.

WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.

LOG: Appbase = file:///C:/Users/uhrsk.MSI/Source/Repos/xGuysOG/StoreSyncAPI/StoreSyncAPI/

LOG: Initial PrivatePath = [C:\Users\uhrsk.MSI\Source\Repos\xGuysOG\StoreSyncAPI\StoreSyncAPI\bin](file:C:/Users/uhrsk.MSI/Source/Repos/xGuysOG/StoreSyncAPI/StoreSyncAPI/bin)

LOG: Dynamic Base = [C:\Users\uhrsk.MSI\AppData\Local\Temp\Temporary](file:C:/Users/uhrsk.MSI/AppData/Local/Temp/Temporary) ASP.NET Files\vs\1dba7bd2

LOG: Cache Base = [C:\Users\uhrsk.MSI\AppData\Local\Temp\Temporary](file:C:/Users/uhrsk.MSI/AppData/Local/Temp/Temporary) ASP.NET Files\vs\1dba7bd2

LOG: AppName = 8a992f58

Calling assembly : (Unknown).

===

LOG: This bind starts in default load context.

LOG: Using application configuration file: [C:\Users\uhrsk.MSI\Source\Repos\xGuysOG\StoreSyncAPI\StoreSyncAPI\web.config](file:C:/Users/uhrsk.MSI/Source/Repos/xGuysOG/StoreSyncAPI/StoreSyncAPI/web.config)

LOG: Using host configuration file: [C:\Users\uhrsk.MSI\Documents\IISExpress\config\aspnet.config](file:C:/Users/uhrsk.MSI/Documents/IISExpress/config/aspnet.config)

LOG: Using machine configuration file from [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.](file:C:/Windows/Microsoft.NET/Framework64/v4.0.30319/config/machine.config.)

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

LOG: Attempting download of new URL file:///C:/Users/uhrsk.MSI/AppData/Local/Temp/Temporary ASP.NET Files/vs/1dba7bd2/8a992f58/AVIExporterClientMW.DLL.

LOG: Attempting download of new URL file:///C:/Users/uhrsk.MSI/AppData/Local/Temp/Temporary ASP.NET Files/vs/1dba7bd2/8a992f58/AVIExporterClientMW/AVIExporterClientMW.DLL.

LOG: Attempting download of new URL file:///C:/Users/uhrsk.MSI/Source/Repos/xGuysOG/StoreSyncAPI/StoreSyncAPI/bin/AVIExporterClientMW.DLL.

LOG: Assembly download was successful. Attempting setup of file: [C:\Users\uhrsk.MSI\Source\Repos\xGuysOG\StoreSyncAPI\StoreSyncAPI\bin\AVIExporterClientMW.dll](file:C:/Users/uhrsk.MSI/Source/Repos/xGuysOG/StoreSyncAPI/StoreSyncAPI/bin/AVIExporterClientMW.dll)

LOG: Entering download cache setup phase.

LOG: Assembly Name is: AVIExporterClientMW, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7e3bf503659a8cbe

LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.

LOG: Using application configuration file: [C:\Users\uhrsk.MSI\Source\Repos\xGuysOG\StoreSyncAPI\StoreSyncAPI\web.config](file:C:/Users/uhrsk.MSI/Source/Repos/xGuysOG/StoreSyncAPI/StoreSyncAPI/web.config)

LOG: Using host configuration file: [C:\Users\uhrsk.MSI\Documents\IISExpress\config\aspnet.config](file:C:/Users/uhrsk.MSI/Documents/IISExpress/config/aspnet.config)

LOG: Using machine configuration file from [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.](file:C:/Windows/Microsoft.NET/Framework64/v4.0.30319/config/machine.config.)

LOG: Post-policy reference: AVIExporterClientMW, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7e3bf503659a8cbe

LOG: GAC Lookup was unsuccessful.

LOG: Binding succeeds. Returns assembly from [C:\Users\uhrsk.MSI\AppData\Local\Temp\Temporary](file:C:/Users/uhrsk.MSI/AppData/Local/Temp/Temporary) ASP.NET Files\vs\1dba7bd2\8a992f58\assembly\dl3\172f7fe6\00809fed_cd94d901\AVIExporterClientMW.dll.

LOG: Assembly is loaded in default load context.

I hope someone has met a similar issue or just has any idea of what i might have done wrong?

The answer might be here.. https://developer.milestonesys.com/s/question/0D53X0000A5QWsDSQW/could-not-load-file-or-assembly-aviexporterclientmwdll-or-one-of-its-dependencies-the-specified-module-could-not-be-found

Sadly not their workarounds seem to only work inside of visual studio but not in deploy within the IIS.

There is a new version out (2023R3). This is new documentation. I hope it helps. - https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/sdk_in_an_iis.html&tree=tree_search.html?search=iis