程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> .NET實例教程 >> Asp.Net 128 錯誤:"編譯器失敗,錯誤代碼為 128"

Asp.Net 128 錯誤:"編譯器失敗,錯誤代碼為 128"

編輯:.NET實例教程

遇到錯誤,我首先在網上搜索了一下,網上的答案是:

 

it's a really horrible dream!

One morning , afeter i open my computer, i found that all my ASP.Net web application could not run again!

I searched the problem with google, but nothing is valuable.

The following method is at least useful to me, I hope u are also lucky!

First of all, update your antivirus software and make a full scan on your computer. I guess the cause of the problem is that some hacker has entered in my computer and made some change in my account and security settings, so the sensitive ASP.Net found it and then stopped working. (注:大意是檢查電腦,電腦可能被黑客攻擊更改了配置。)

After u are sure no viruse is in your computer, u can follow the steps below.

1. run "ASPnet_regIIS -ua" in the cmd. u can start the cmd from the vs.Net tools in the start menu, otherwise u need type the full path.

2. remove the ASPnet account from your computer

3. uninstall IIS

4. restart your computer

5. reinstall IIS

6. run "ASPnet_regiss -i" in the cmd

7. add vs_developers group to iis operators (u can Operation in IIS)

8. open the file "Machine.config" which is in "C:\WINNT\Microsoft.Net\Framework\v1.1.xxxx\CONFIG", then find and replace
userName="Machine"
with
userName="SYSTEM"

9. restart your computer and pray silently



I can't promise u anything, but i will pray for u.
 

仔細對比了一下,排除以上所有原因。因為我一份程序在3個目錄運行,其它兩個目錄下都是好的,但是就這個是出了128錯誤的。

自已查看了編譯輸出:

 

c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.XML.Linq.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\assembly\dl3\e8d26ca0\5eb31c0d_10eec801\Yurow.Common.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.6.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.8.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.3.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.5.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.2.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.4.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.1.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.Net Files\jp3\371b3559\fe4c0fc4\App_Code.kmksavfh.7.cs"
 

 

我想有可能是dll加載出錯了。然後,我更新了web.config文件,把裡面的configSections,assemblIEs,pages,httpHandlers,httpModules,system.codedom,system.webServer,runtime這些我用不到的節點都去掉了。

但是還報這個錯誤。但是我意外的發現,web.config文件中文注釋變成了亂碼。然後我用記事本打開,另存時選擇utf-8編碼而不是anis編碼。錯誤解決了。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved