2012-03-13 367 views
5

我有一臺運行Windows Server 2008 R2 Standard和SharePoint Server 2010 SP1的虛擬機(在筆記本電腦上運行在VMWare Workstation 8.0.2中)我用於SharePoint開發(Visual Studio 2010安裝在虛擬機上)。有時候,我得到了以下錯誤消息:編譯器失敗,錯誤代碼爲-1073741502(在Windows Server 2008 R2上運行的SharePoint 2010 SP1)

Server Error in '/' Application. 
-------------------------------------------------------------------------------- 

Compilation Error 
Description: An error occurred during the compilation of a resource required to service  this request. Please review the following specific error details and modify your source  code appropriately. 

Compiler Error Message: The compiler failed with error code -1073741502. 

Show Detailed Compiler Output: 

c:\windows\system32\inetsrv> 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe"  /t:library /utf8output /R: 
"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\AscomADManager\1.0.0.0__e27e5c95e5e50246\AscomADManager.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.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.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R: 
"C:\Windows\assembly\GAC_64\Microsoft.Office.Server.Search\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Server.Search.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R: 
"C:\Windows\assembly\GAC_64\Microsoft.SharePoint.Search\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Search.dll" /R: 
"C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.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\Microsoft.SharePoint.Publishing\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Publishing.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\Microsoft.Web.CommandUI\14.0.0.0__71e9bce111e9429c\Microsoft.Web.CommandUI.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R: 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7e9d64cc\e402abe9\App_GlobalResources.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R: 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7e9d64cc\e402abe9\App_global.asax.dll" /R: 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorlib.dll" /R: 
"C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R: 
"C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R: 
"C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Access.Server.UI\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Access.Server.UI.dll" /out: 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7e9d64cc\e402abe9\App_Web_usereditform.ascx.d7f0a421.emiw9vda.dll" /D:DEBUG /debug+ /optimize- /win32res: 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7e9d64cc\e402abe9\q8k8a1mo.res" /w:4 /nowarn:1659;1699;1701 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7e9d64cc\e402abe9\App_Web_usereditform.ascx.d7f0a421.emiw9vda.0.cs" 
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7e9d64cc\e402abe9\App_Web_usereditform.ascx.d7f0a421.emiw9vda.1.cs" 

-------------------------------------------------------------------------------- 
Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET  Version:2.0.50727.4955 

引發該錯誤很隨意,有時當我啓動一個新的功能,有時當我只是瀏覽網頁/列表在SharePoint。我當然有一派的問題,我發現它的一些解決方案已爲一些其他用戶的工作(但不是全部):

  • 做一個IISRESET(不爲我工作)
  • 做一個IISRESET,然後重新啓動(不爲我工作)
  • 刪除ASP.NET臨時文件(不爲我工作)
  • 刪除ASP.NET臨時文件並重新啓動(不爲我工作)
  • 重新安裝(修復).NET框架(唯一適用於我的解決方案)

有沒有人有解決方案的想法,修復了這個問題,而不修復.NET框架?這是非常耗時的,更不用說不得不經常沮喪。該錯誤每天發生在三到十次之間。

更新:這是在Windows事件日誌中記錄的警告。

Event code: 3007 
Event message: A compilation error has occurred. 
Event time: 4/4/2012 12:48:04 PM 
Event time (UTC): 4/4/2012 10:48:04 AM 
Event ID: ea6ef6e68cb14f858564f541ff1389f6 
Event sequence: 42 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1794141158/ROOT-1-129780060874042968 
    Trust level: WSS_Minimal 
    Application Virtual Path:/
    Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\80\ 
    Machine name: SP2010 

Process information: 
    Process ID: 13668 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
    Exception type: HttpCompileException 
    Exception message: External component has thrown an exception. 

Request information: 
    Request URL: http://sp2010/sites/test52/projects/default.aspx 
    Request path: /sites/test52/projects/default.aspx 
    User host address: fe80::18b5:d6c1:ca34:5476/ 
    User: SP20100\marcus 
    Is authenticated: True 
    Authentication Type: Negotiate 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

Thread information: 
    Thread ID: 11 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: True 
    Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile() 
    at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() 
    at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) 
    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) 
    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) 
    at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) 
    at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) 
    at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) 
    at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 


Custom event details: 
+0

這是有人用同樣的錯誤(但在HEX而非DEC):http://stackoverflow.com/questions/3646265/iis-doesnt-start-error-code-c0000142 – jgauffin 2012-03-16 18:33:18

+0

[ASP.NET奇怪的編譯錯誤!](http://stackoverflow.com/questions/6817870/asp-net-strange-compilation-error) – jgauffin 2012-03-16 18:35:56

+0

I忘了提及我已經嘗試更改應用程序池標識(我的設置爲NetworkService,將其更改爲ApplicationPoolIdentity沒有幫助)。應用程序名稱已設置,並且尚未更改爲空字符串。 – 2012-03-19 08:13:40

回答

3

我有同樣的問題...我停止我的應用程序在應用程序池回收我與它解決了我的問題的應用程序的應用程序池。

1

非常感謝你,我有一個類似的問題,我可以確認(所有其他嘗試後)只有Framework 3.5的'修復'執行修復了這個問題。

重新安裝(維修).NET框架(即對我的作品的唯一解決方案)

相關問題