ASP.NET: problem loading managed C++ DLL

G

Guest

Hello All

I have a unmanaged C++ DLL, which has been wrapped up with a manged C++ DLL.
When i refer to this managed DLL in Windows form based applications it works out fine. But when i refer to the the same managed C++ DLL in ASP.Net application. [i.e, : ASP.NET --> TALW (managed C++ DLL) --> TAL (unmanaged c++ DLL)

it gives me the following runtime error

(where TALW is the managed c++ wrapper around a umanaged C++ dll

Server Error in '/EMSUI' Application.
-------------------------------------------------------------------------------

Unable to load file 'TALW'.
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.FileLoadException: Unable to load file 'TALW'

Source Error:

Line 34: case "start"
Line 35: objServices = new Services()
Line 36: objEms.init()
Line 37: xmlData = objEms.getAllServices() ;//objServices.GetAllSevices()
Line 38: if(xmlData == "error"


Source File: c:\inetpub\wwwroot\emsui\actionclasses\actionservices.cs Line: 36

Stack Trace:

[FileLoadException: Unable to load file 'TALW'.
EMSStubSpace.EMSStub.init() +
EMSUI.ActionClasses.ActionServices.Execute(HttpContext context) in c:\inetpub\wwwroot\emsui\actionclasses\actionservices.cs:3
MVCWeb.Controller.ProcessRequest(String actionControlID, HttpContext context) in f:\dmp\modules\ui framework\development\src\controller.cs:7
EMSUI.ServicesUI.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\emsui\services.aspx.cs:4
System.Web.UI.Control.OnLoad(EventArgs e) +6
System.Web.UI.Control.LoadRecursive() +3
System.Web.UI.Page.ProcessRequestMain() +73

I tried placing all the refered DLLS in System32 and System folder. But no vain
Please help me out

You can directly mail as well at : (e-mail address removed)/ (e-mail address removed)

NG
 
S

Simon Kennedy

Hi NGM,

We had similar problems loading our Managed C++/Unmanged C++ DLL combo. The reasons
why they failed included:

* The Unmanaged DLL were not in the system evironment variable
* There was a conflict with some global C++ classes and the .NET classes.

The error we were getting was more like:

"[FileNotFoundException]: File or assembly name SomeDLL, or one of its dependencies, was not found."

so I'm wondering if your issue is really a problem with loading the unmanaged DLL. I'm a assuming
that the unmanaged DLL is dynamically linked but statically linked through a lib.

It seems strange that it occurs during a page load and no sooner. How have you referenced
the Managed C++ library?

Simon. K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top