解決方案:如果你的程序是2.0的,則刪除 C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/中的所有的文件
如果是4.0的,刪除C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET files這里的所有文件
具體的錯誤信息如下:
“/SC”應用程序中的服務器錯誤。
未能加載文件或程序集“ICSharpCode.SharpZipLib”或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))
說明: 執行當前 Web 請求期間,出現未處理的異常。請檢查堆棧跟蹤信息,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細信息。
異常詳細信息: System.IO.FileLoadException: 未能加載文件或程序集“ICSharpCode.SharpZipLib”或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))
源錯誤:
執行當前 Web 請求期間生成了未處理的異常。可以使用下面的異常堆棧跟蹤信息確定有關異常原因和發生位置的信息。
程序集加載跟蹤: 下列信息有助於確定程序集“ICSharpCode.SharpZipLib”無法加載的原因。
=== 預綁定狀態信息 ===
日志: 用戶 = IIS APPPOOL\WebSite
日志: DisplayName = ICSharpCode.SharpZipLib
(Partial)
日志: Appbase = file:///E:/Works/Infrastructure/SecurityCenter/05_Code/Branch/V2.0/Manage/WebSite/
日志: 初始 PrivatePath = E:\Works\Infrastructure\SecurityCenter\05_Code\Branch\V2.0\Manage\WebSite\bin
調用程序集: (Unknown)。
===
日志: 此綁定從 default 加載上下文開始。
日志: 正在使用應用程序配置文件: E:\Works\Infrastructure\SecurityCenter\05_Code\Branch\V2.0\Manage\WebSite\web.config
日志: 使用主機配置文件: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
日志: 使用 C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config 的計算機配置文件。
日志: 此時沒有為引用應用策略(私有、自定義、分部或基於位置的程序集綁定)。
日志: 試圖下載新的 URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727
/Temporary ASP.NET Files/sc/f3692213/bbb5c2df
/ICSharpCode.SharpZipLib.DLL。
日志: 試圖下載新的 URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727
/Temporary ASP.NET Files/sc/f3692213/bbb5c2df/ICSharpCode.SharpZipLib
/ICSharpCode.SharpZipLib.DLL。
日志: 試圖下載新的 URL file:///E:/Works/Infrastructure/SecurityCenter/05_Code
/Branch/V2.0/Manage/WebSite/bin/ICSharpCode.SharpZipLib.DLL。
日志: 正在使用應用程序配置文件: E:\Works\Infrastructure\SecurityCenter\05_Code\Branch\V2.0\Manage\WebSite\web.config
日志: 使用主機配置文件: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
日志: 使用 C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config 的計算機配置文件。
日志: 策略后引用: ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
錯誤: 未能完成程序集的安裝(hr = 0x80070057)。探測終止。
堆棧跟蹤:
[FileLoadException: 未能加載文件或程序集“ICSharpCode.SharpZipLib”或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))]
[FileLoadException: 未能加載文件或程序集
“ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73”
或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: 未能加載文件或程序集
“ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73”
或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): 未能加載文件或程序集
“ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73”
或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
[HttpException (0x80004005): 未能加載文件或程序集
“ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73”
或它的某一個依賴項。參數錯誤。 (異常來自 HRESULT:0x80070057 (E_INVALIDARG))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8901019
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333