Wednesday, June 27, 2012

How to resolve the specified module could not be found error

How to Resolve ASP.NET Runtime error :"the specified module could not be found"

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I have faced this error when i deployed an application in one of my machine. The same source code is working in another machine which has the same configuration.

Finally i could resolve this issue with following the below step:
1. I completely removed all the dll from the virtual directory leaving only the startup dll.
2. Now i browsed the application and the startup page loaded succesfully.
3. I keep adding the dll one by one opened the application and checked.
4. When i add 'Microsoft.SqlServer.Replication.dll' and try opening the application i got the "the specified module could not be found" error.
5. Now we have found the source file which causes the error.
6. Using the dependency checker, i tried to check the dependency of  'Microsoft.SqlServer.Replication.dll' and found one dll missing. Finally i copied the missing dll from the machine where the application is working and moved into this new machine.

The issue got resolved.

No comments: