By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,501 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

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

P: n/a
ulf
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(Trans actionEndDelegate 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\mscorl ib.dll', No symbols loaded.
'SimpleTest': Loaded
'C:\temp\csharptestprojects\SimpleTest\bin\Debug\S impleTest.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__b77a5c56 1934e089\system.dll', No
symbols loaded.
'SimpleTest.exe': Loaded
'c:\winnt\assembly\gac\system.enterpriseservices\1 .0.5000.0__b03f5f7f11d50a3a\system.enterpriseservi ces.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.enterpriseservi ces.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



Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
PJ
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
"ulf" wrote:
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(Trans actionEndDelegate 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\mscorl ib.dll', No symbols loaded.
'SimpleTest': Loaded
'C:\temp\csharptestprojects\SimpleTest\bin\Debug\S impleTest.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__b77a5c56 1934e089\system.dll', No
symbols loaded.
'SimpleTest.exe': Loaded
'c:\winnt\assembly\gac\system.enterpriseservices\1 .0.5000.0__b03f5f7f11d50a3a\system.enterpriseservi ces.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.enterpriseservi ces.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


Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.