System.IO.FileNotFoundException: specified module could not be fou

G

Guest

Hello,

After I got a FileNotFoundException in my real life CSharp code, I nailed it
down to the following line:

System.EnterpriseServices.ResourcePool rp = new
System.EnterpriseServices.ResourcePool(null);

The exception I get for this line is
System.IO.FileNotFoundException: The specified module could not be found.
at System.EnterpriseServices.Platform.Initialize()
at System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb)
at SimpleTest.Class1.Main(String[] args) in
c:\temp\csharptestprojects\simple
test\class1.cs:line 44

The debugger shows the following libraries loaded:
'DefaultDomain': Loaded
'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded.
'SimpleTest': Loaded
'C:\temp\csharptestprojects\SimpleTest\bin\Debug\SimpleTest.exe', Symbols
loaded.
'SimpleTest.exe': Loaded
'c:\winnt\assembly\gac\system.management\1.0.5000.0__b03f5f7f11d50a3a\system.management.dll', No symbols loaded.
'SimpleTest.exe': Loaded
'c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
symbols loaded.
'SimpleTest.exe': Loaded
'c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll', No symbols loaded.
The thread '<No Name>' (0x9cc) has exited with code 0 (0x0).
'SimpleTest.exe': Loaded
'c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll', No symbols loaded.
A first chance exception of type 'System.IO.FileNotFoundException' occurred
in system.enterpriseservices.dll



I know, the nullparameter in the testcase is not correct but it reproduces
the problem I have.
Badly, the FileNotFoundException.FileName parameter is empty. So I do not
know which module we are talking about.
I am using a MS 2000 Server OS with the latest .NET Framework1.1 installed.
Wierd is that I got this error only on a single computer, which is my Dev
Machine.
When I execute this on any other of my computers I get no exception.


Has someone an idea how I can find out whats going on?

thanks,
Ulf
 
G

Guest

After couple of hours assembly language debugging, figured out that it throws
that exception because a call to native Win32 API LoadLibraryW was failing.
The LoadLibraryW was trying to load "comadmin.dll". It is supposed to be
available in '\WINNT\system32\com' directory, and was not there. So, once I
copied that DLL from another system, it worked like a charm.

I guess that DLL is part of "Component Services" (in the AdministrativeTools
menu), but was missing on the problem system. Perhaps, the "Component
Services" were never installed or was messed up.

Hope this helps others.

P
 

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

Top