Friday, February 16, 2007

The Specified Module Could not be Found

This week, I'm helping another branch out with some bug fixes on a web application that I originally assisted with years ago. Or, I should say that I'm attempting to help them out. The first challenge is getting my development environment set up to run this massive application.

Today, everything was working until I tried to test reporting (which happens to also be the area of the system that my issue involves). These reports use a third-party tool to create Excel documents on the server. Despite everything that I could think of, I kept getting a pretty generic error message during the ctor() call of one of the objects in that Excel writer library:

"The specified module could not be found."

The problem, as it turned out, was not due to ASP.NET's inability to find the assembly. What happened was that the assembly was merely an interop wrapper for a COM library, and because I had just "xcopy deployed" the web application, the COM library never got registered.

The solution: regsvr32 the COM DLL that the Interop Assembly required.