Green Dragon's Lair

Chasing down a FileNotFoundException with no filename

I've spend 9 hours today after deploying the server side WCF service of our POS application chasing down the most bizzare exception I've ever seen. I got a FileNotFoundException that didn't had a filename, and that gave me an HRESULT of 0x8007007E, which is really a COM error code, rather than a .Net error code.

 

The biggest problem was that nothing I did gave me results of any kind: asp.net permissions, changing the virtual directory, enabling the Fusion log, uninstalling and reinstalling the .Net framework, nothing.

 

Eventually I managed to narrow it down after digging through google, turns out this error happens when .Net tries to resolve a reference to an unmanaged dll and fails. In my case it was the Sql Server Native Client, sqlncli.dll, which wasn't installed on the server. I found it out by running FileMon, and almost immediatly seeing it search for sqlncli.dll and failing.

 

I've seen several people on google trying to find a resolution to their variation of this problem, and most of them solved by guessing at the missing dll, so save yourself the time, when you get such an exception, start FileMon and check for the missing files.


Posted Jul 25 2007, 01:03 PM by admin

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
(C) Miki Watts
Powered by Community Server (Non-Commercial Edition), by Telligent Systems