25 [Fix]-Parser error when publishing on server - wikitechy.com

[Fix]-Parser error when publishing on server

Wikitechy | 2147 Views | asp.net | 28 May 2016

 

Scenario:

An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Cannot execute a program. 

Error:

Line 1: <%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="MasterPage.Master" CodeBehind="index.aspx.vb" Inherits="COT3_Empty_Web.index" %>Line 2: <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">Line 3: </asp:Content>
The Web.config file used is give below:
<?xml version="1.0" encoding="utf-8"?><configuration><system.web><customErrors mode="Off"/><trust level="Full"/><authentication mode="None"/><compilation debug="true" strict="false" explicit="true" targetFramework="4.5.2"/><httpRuntime targetFramework="4.5.2"/></system.web><system.codedom><compilers><compiler language="c#;cs;csharp" extension=".cs"type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/><compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/></compilers></system.codedom></configuration>

Fix 1:

The memory shortage occurred due to a memory leak in a COM component. Setting the memory limit on the Application Pool recycle settings proved to be a temporary fix until the memory leak gets sorted.

Fix 2:

Turn off custom errors in web.config file as shown below:

<system.web>   <customErrors mode="Off"/>   <trust level="Full"/>   <authentication mode="None"/></system.web>





Workshop

Bug Bounty
Webinar

Join our Community

Advertise
<