Reading Object Info in ASP.net
#1
I have an ASP.net web application where a .glb file is uploaded to the server after which I need to read the object information.  All this works fine when I run it on my local machine i.e. localhost.  However, I get the following error when I run it on the server. The Assimp and Ab3d dll's are in the bin folder.

The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Source Error:


Code:
Line 20:         Dim assimpWpfImporter As New AssimpWpfImporter()
Line 21:         Dim readModel3D As Model3D
Line 22:         readModel3D = assimpWpfImporter.ReadModel3D(FileName$)
Line 23:         Dim ObjectInfo$ = Ab3d.Utilities.Dumper.GetModelInfoString(readModel3D)
Line 24:         txtObjectInfo.Text = ObjectInfo$


Source File: E:\AlmaxAdmin\Test\ObjectInformation.aspx.vb    Line: 22

Stack Trace:


Code:
[FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]

[AssimpException: Error loading unmanaged library from path: Assimp32.dll, see inner exception for details.
The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
  Assimp.Unmanaged.AssimpLibraryWindowsImplementation.NativeLoadLibrary(String path) +134
  Assimp.Unmanaged.AssimpLibraryImplementation.LoadAssimpLibrary(String path) +33
  Assimp.Unmanaged.AssimpLibrary.LoadLibrary() +63
  Assimp.Unmanaged.AssimpLibrary.IsExtensionSupported(String extension) +44
  Ab3d.Assimp.AssimpWpfImporter.ReadFileToAssimpScene(String fileName) +78
  Ab3d.Assimp.AssimpWpfImporter.ReadModel3D(String fileName, String texturesPath) +22
  ObjectInformation.LoadModel2(String FileName) in E:\AlmaxAdmin\Test\ObjectInformation.aspx.vb:22
  ObjectInformation.Page_Load(Object sender, EventArgs e) in E:\AlmaxAdmin\Test\ObjectInformation.aspx.vb:17
  System.Web.UI.Control.OnLoad(EventArgs e) +95
  System.Web.UI.Control.LoadRecursive() +59
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678
#2
One reason for this error could be that you force loading a 32 bit Assimp dll into 64 bit process (or vice versa) or that the required dll is missing (for example there is only Assimp32.dll but not Assimp64.dll). But if both dlls are present and if you do not manually load one dll into the process, then the assimp wrapper should pick the correct version of the dll based on the current process (32 or 64 bit).

So a more possible reason for the error is probably that the "Visual C++ C Runtime (CRT) for Visual Studio 2015" is not installed on the web server. If you have admin access to the server then you can install that there. Otherwise you can copy all required files to the applications folder.

See more here: https://devblogs.microsoft.com/cppblog/i...ersal-crt/ (see 6th point at the end of the document for instructions on how to copy required files).
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)