ASP.NET application gets RTS error 173 - "Program not Found" when attempting to call an unmanaged .dll in same folder

0 Likes
over 8 years ago

Problem:

Customer has an ASP.NET Web application written in Visual COBOL which does a call to an unmanaged COBOL .dll.

The .dll is located in the web applications bin folder along with the calling program yet when a call is made a 173 error "Program Not Found" occurs.

How can this be resolved?

Resolution:

When an ASP.NET application is run, the sources for the web pages are moved to a temporary location, compiled and run from that temporary location so the default folder is no longer the bin folder..

The unmanaged .dlls are not moved to this temprary location so the web application needs to know where to look for these files.

It is therefore necessary to place the location of these unmanaged .dlls within the PATH environment variable.
This can be done directly within the web applications web.config file by right-clicking on web.config in Solution Explorer and selecting the Edit option.

You can then add the PATH environment variable and set it to the value of the folder in which your unmanaged .dlls reside.

 

Comment List
Anonymous
Related Discussions
Recommended