Personal tools
You are here: Home Documentation Errors Unable to load dll (mapscript)

Unable to load dll (mapscript)

Document Actions
One of the dll-s could not be loaded that mapscript.dll depends on.

You can get this problem on Windows and in most cases it can be dedicated to a missing or an unloadable shared library. The error message talks about mapscript.dll but surely one or more of the dll-s are missing that libmap.dll depends on. So firstly you might want to check for the dependencies of your libmap.dll in your application directory. You can use the Visual Studio Dependency Walker to accomplish this task. You can also use a file monitoring tool (like SysInternal's filemon) to detect the dll-s that could not be loaded. I propose to store all of the dll-s required by your application in the application folder. If you can run the mapscript sample applications properly your compilation might be correct and all of the dlls are available.

<C# specific>

You may find that the mapscript C# interface behaves differently for the desktop and the ASP.NET applications. Although you can run the drawmap sample correctly you may encounter the dll loading problem with the ASP.NET applications. When creating an ASP.NET project your application folder will be 'Inetpubwwwroot[YourApp]bin' by default. The host process of the application will aspnet_wp.exe or w3wp.exe depending on your system. The application will run under a different security context than the interactive user (under the context of the ASPNET user by default). When placing the dll-s outside of your application directory you should consider that the PATH environment variable may differ between the interactive and the ASPNET user and/or you may not have enough permission to access a dll outside of your application folder.

<end C# specific>

This Error Reference applies to: MapServer 4.6, MapServer 4.8, MapServer 4.10

by Tamas Szekeres last modified 2006-10-11 16:40

Powered by Plone