我有许多运行IIS 7.5的Windows Server 2008 R2 Standard上托pipe的.Net Web应用程序。 加载每个应用程序将引发以下exception:
Exception information: Exception type: ConfigurationErrorsException Exception message: Could not load file or assembly 'DotnetAgentHttpModule, Version=3.2.3.232, Culture=neutral, PublicKeyToken=2311bd8fc83e4f7c' or one of its dependencies. The system cannot find the file specified. at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit, Boolean ignoreCase) at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
引用的程序集不是来自我们的应用程序,堆栈跟踪表明它是一个微软程序集,但是使用这个特定的名称不会造成任何结果。 我有相同版本的相同的应用程序托pipe在相同的服务器上都工作正常,所以我相当确信应用程序本身不是问题。 我已经尝试回收各自的应用程序池,重新启动IIS,删除临时ASP.Net文件,重新部署应用程序,重新启动并重新安装.Net框架。 就我所知,最近没有对服务器硬件或软件进行任何更改。 任何人都可以提出什么可能是这种例外的原因?
看起来,你有自定义的httpModule。 你需要去服务器上的一切工作的IISpipe理器。 检查模块并find模块DotnetAgentHttpModule: 模块的例子
然后转到它所在的文件path,并将该模块复制到新的服务器(应用程序抛出错误)。
转到IISpipe理器并添加此模块