0
votes

I made an MVC project using VS 2017 I was using IIS Server v10 on my local machine for testing, now that Im uploading my project to the server w/Windows server 2008 and IIS Server v6 I get the following compilation error code -2146232576

I already tried the following solution Compilation error -2146232576 removing the packages with nuget PM - > Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers from my project, but it didn't work.

Im also not deploying the project from VS2017 using web deployment tool, Im accessing from a remote desktop to the server, and "Adding a new website" from the IIS Server Admin tool, the project folder is in a "Cloud folder", so I attach the new website to that folder.

Any help will be really appreciated, thanks!

BTW, If I click "See compiler results" I get the following :

c:\windows\system32\inetsrv>D:\Intranet\Intranet Nueva\InventariosBodega\InventoryMVC\bin\roslyn\csc.exe /t:library /utf8output /nostdlib+ /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\28c4dd2b\0074b766_899bd301\System.Web.Helpers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\f76361e7\0074b766_899bd301\System.Web.WebPages.Razor.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\dd2c8dcd\00405cc9_889bd301\System.Web.Mvc.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\ee1ff4a7\00fb1244_1dacd301\Microsoft.AI.ServerTelemetryChannel.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\0c5caa47\0074b766_899bd301\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\4652d562\00f41bc5_6e64d301\ExcelNumberFormat.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\21ff0145\006fa443_52f0d201\Microsoft.AspNet.TelemetryCorrelation.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\387466b6\80ac78b8_cf60d401\InventoryMVC.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\bed44328\0084c160_bb46d301\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\8fad2587\00fa1531_3eb5d301\FastMember.Signed.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\554cddff\00048ad2_4adfd201\DocumentFormat.OpenXml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\627ae2bf\0026839d_2dacd301\Microsoft.AI.PerfCounterCollector.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\85ea1a5f\00dd11c0_9fc7d301\EntityFramework.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\4b71c96c\008b5b5b_7518cf01\WebGrease.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\d1c7755a\007e36de_6f27cf01\System.Web.Optimization.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\c290801e\00d0aa3b_992ad401\ClosedXML.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\6c38dd12\00b64a64_2dacd301\Microsoft.AI.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\8a8f3694\00dd11c0_9fc7d301\EntityFramework.SqlServer.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\17fb612d\00f9519c_2dacd301\Microsoft.AI.WindowsServer.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\a2f7474a\005caad7_889bd301\System.Web.Razor.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\40d8bd40\00a03031_75aece01\Antlr3.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\4338dd4e\00f41cc3_8d6acd01\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\21d2e02d\00efe283_77efd201\Microsoft.AI.Agent.Intercept.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\d123d09e\000abfde_1cacd301\Microsoft.ApplicationInsights.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\3bf86b34\0074b766_899bd301\System.Web.WebPages.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\890412f9\00db9f04_2cacd301\Microsoft.AI.DependencyCollector.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\5ef1cd79\0069d048_a800d301\System.Diagnostics.DiagnosticSource.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\assembly\dl3\ecd0c0d7\005f8d6b_cfa8d301\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\App_global.asax.sntr_4gi.dll" /D:DEBUG /debug+ /optimize- /warnaserror- /w:4 /nowarn:1659;1699;1701;612;618 /langversion:6 /nowarn:1659;1699;1701 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4d6ed61a\App_global.asax.sntr_4gi.0.cs" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e9dba4d1\4

1

1 Answers

0
votes

The compiler error relates to a "Desktop Heap exhaustion", the compiler is effectively encountering a (a very specific type of) memory limit when attempting to compile your application.

Bottom line, this is a very old server and i strongly advice you upgrade to a more modern version of Windows. If you cant, the following may help:

  1. It may be possible to build the site locally and deploy the binaries - this should prevent the need to compile your code server side and work-around your immediate issue - but the "age gap" between your OS and your chosen technologies to build your app could cause further issues down the road - this is a legacy operating system after all.

  2. Another option is to change the user your app pool is running under - assuming you have more than 1 app pool using the same identity this will be eating into the various per user memory limits (which are now 10 years old!) - again this might side-step your issue.

  3. Your final option is a registry edit to increase the Desktop Heap size of csrss (Client server runtime sub-system) - DISCLAIMER: editing the registry is fine if done correctly, but does include the possibility of rendering your server unbootable - make sure you understand the process and have a viable backup etc etc etc before proceeding. Under the registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems the Windows key has a command starting %SystemRoot%\system32\csrss.exe and includes an argument SharedSection= followed by 3 comma separated numbers. The 3rd value needs to be increased to change the desktop heap size. Ive seen guidance vary, so i would suggest start small - take the current value, add 1024 or 2048 at a time until the error goes away - dont go crazy with this setting - values are in KiloBytes so 1024KB = 1 Megabyte - you shouldnt need more than a few MB for this value. A Reboot will be required to make the change active after editing the registry.

Below article applies to Server 2008 (but i dont have access to a machine to test!!!) and give more detailed instructions: https://blogs.msdn.microsoft.com/friis/2012/09/19/c-compiler-or-visual-basic-net-compilers-fail-with-error-code-1073741502-when-generating-assemblies-for-your-asp-net-site/

Last thing... Server 2008/2008R2 will reach end of life January 14, 2020 - no more patches - make sure this server is turned off before then... https://www.microsoft.com/en-us/cloud-platform/windows-server-2008