472,127 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

ASP.NET: problem loading managed C++ DLL

NGM
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\actionservi ces.cs Line: 36

Stack Trace:

[FileLoadException: Unable to load file 'TALW'.
EMSStubSpace.EMSStub.init() +
EMSUI.ActionClasses.ActionServices.Execute(HttpCon text context) in c:\inetpub\wwwroot\emsui\actionclasses\actionservi ces.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 : ng********@hotmail.com/ am******@yahhoo.co

NG

Nov 18 '05 #1
2 2060
NGM
No one has yet replied :(
Nov 18 '05 #2
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
NGM wrote:
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\actionservi ces.cs Line: 36

Stack Trace:

[FileLoadException: Unable to load file 'TALW'.]
EMSStubSpace.EMSStub.init() +0
EMSUI.ActionClasses.ActionServices.Execute(HttpCon text context) in c:\inetpub\wwwroot\emsui\actionclasses\actionservi ces.cs:36
MVCWeb.Controller.ProcessRequest(String actionControlID, HttpContext context) in f:\dmp\modules\ui framework\development\src\controller.cs:78
EMSUI.ServicesUI.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\emsui\services.aspx.cs:41
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
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 : ng********@hotmail.com/ am******@yahhoo.com

NGM



Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

77 posts views Thread by Tim Anderson | last post: by
7 posts views Thread by Staale L. Hansen | last post: by
4 posts views Thread by IamZIM! | last post: by
15 posts views Thread by Herby | last post: by
10 posts views Thread by Richard MSL | last post: by
8 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.