Question

I have tried using the NMath library on a ASP.NET 4 web application hosted in IIS. While it works perfectly o the development machine, on the server it throws this exception:

Unable to load DLL 'nmath_native_x86.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

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.DllNotFoundException: Unable to load DLL 'nmath_native_x86.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[DllNotFoundException: Unable to load DLL 'nmath_native_x86.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
CenterSpace.NMath.Kernel.DotNetBlas.ca985db1fb290841a533a3547ace1ae2b(Int32* ca9e3f1c0641beace93cb8eb4a27060d6, Double* cf339080161dff75cfd1b46a10c2eec70, Int32* c757a2154665e6da4d820f8c504ec2601, Double* c00a69c4fa5b6d809b68a96ca184dcf79, Int32* c1565590bf448d2c630952a0391360cc3) +0
CenterSpace.NMath.Kernel.DotNetBlas.copy(Int32 n, DoubleDataBlock x, Int32 xOffset, Int32 incx, DoubleDataBlock y, Int32 yOffset, Int32 incy) +149 CenterSpace.NMath.Core.DoubleVector.set_Item(Slice slice, DoubleVector value) +165

While i have read around here that it might be related the the permissions of the AppPool or something similar, I can't seem to point down the problem. What could it be?!

Was it helpful?

Solution

It could be a couple of options.

1) Is the C++ runtime installed? NMath can't load a native dll without it. See the deployment section here: http://centerspace.net/doc/NMath/user/overview-83427.htm#Xoverview-83427

2) Perhaps you're not configuring NMath correctly? You can do NMathConfiguration.NativeLocation to point to a location. More here:

http://centerspace.net/doc/NMathSuite/ref/html/T_CenterSpace_NMath_Core_NMathConfiguration.htm

Finally, please generate log file using NMathConfiguration.LogLocation. The resulting log file will tell you what's wrong.

  • Trevor
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top