published web site: The specified module could not be found. Exception from HRESULT: 0x8007007E


I'm having a problem when browsing a published site on local iis7 (on windows 7).

When browsing the site through VS2008 with F5 (dev iis) it works fine. When publishing it and browsing, I get a:

Server Error in '/MySite' Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Stack trace offers no clue on the problematic dll either. I copied the same published folder to a different machine (also with windows 7 32bit and iis 7) and it works.

Since this is a fresh install of iis on my machine, I verified the matching selected items in "Turn Windows Features on/off". After noticing the issue I also ran the "aspnet_regiis" util, but the problem remains.

The web site includes several external dlls (native and managed) and they all appear in the published bin folder (which is identical to the development bin folder)

Any insights?


asked on Stack Overflow Feb 14, 2010 by Shay • edited Jun 20, 2020 by Community

4 Answers


As gleaned from this thread:, as mentioned toward the bottom of the thread (second to last post as of right now), our problem was a "rogue" dll, Microsoft.SqlServer.Replication.dll. We simply removed the dll and no more error. Additionally, as no project in the solution referenced this dll, I simply removed it from the bin file and subsequent builds/publishes do not add the dll. I have no idea how the dll got in the bin file in the first place. A college prank, maybe.

answered on Stack Overflow Oct 21, 2011 by MrBoJangles • edited Oct 21, 2011 by MrBoJangles

Native dlls are supposed to be locatable in the PATH. Problem was they were under the User PATH and not the System PATH, so it worked fine through the VS but not through the IIS. I added the dll folder to the system PATH and everything worked...

answered on Stack Overflow Feb 20, 2010 by Shay

A long shot in most cases but check you have good .NET Framework libraries. Was getting nothing from old Framework 2.0 website maintained with VS 2005 running on IIS 6 except plain text in browser window stating the error. Fiddler and Firebug reveled nothing. Started checking this, that and the other thing. Perhaps when wondering about using aspnet_iisreg that the C:\Windows\Microsoft.NET\Framework\v4.0.30319 folder was discovered to have only a handful of files. Doesn't make a lot of sense, the applications were 2.0 but there is some cross application communication and several libraries so maybe some are run as 4.0 or it might be that IIS will try to use some things from the highest version of .NET Framework available.

A co-worker more knowledgeable about servers repaired the 4.0 Framework with the stand alone installer from here. Runs well now.

answered on Stack Overflow Apr 22, 2017 by user3471026 • edited Apr 22, 2017 by user3471026

This error occurred for me when the .Net Framework on the target server was only 4.5.2 and a recently upgraded Nuget package required 4.7.2. To temporarily solve it, we downgraded the Nuget library to a previous version that did not require 4.7.2 until we can upgrade the server library.

This was in spite of our project properties having .NET Framework 4.5.2 selected as a target framework.

answered on Stack Overflow Apr 5, 2020 by Zachary Scott

User contributions licensed under CC BY-SA 3.0