Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 17th, 2006, 08:53 AM
Registered User
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AbhijitSinha
Default Parser Error after publishing application

The application compiles and runs perfectly on the local host.
However as soon as a publish the application to a different server, i get the following error.
Any help would be greatly appreciated.

Parser Error

Description: 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: The base class includes the field 'Footer_Admin', but its type (Admin_Footer_Admin) is not compatible with the type of control (ASP.admin_footer_admin_ascx).

Source Error:

Line 111: </table>
Line 112: <br />
Line 113: <Admin:AdminFooter ID="Footer_Admin" runat="server" Visible="true" />
Line 114: </td>
Line 115: </tr>

Source File: /Encore/Customer/CheckOrder.aspx Line: 113

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Old November 20th, 2006, 08:15 AM
Registered User
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AbhijitSinha

Yooohoooo !!!
Got the solution ... Finally ... :D

It seems like there are some dll files that do not get deleted or flushed out when you try to publish to a different server ... This causes a "Type Mismatch" leading to the above issue.

This is problem occurs because of the way in which ASP.NET 2.0 uses the application references and the folder structure of the application to compile the application. If the batch property of the <compilation> element in the web.config file for the application is set to true, ASP.NET 2.0 compiles each folder in the application into a separate assembly. In this scenario, a circular reference may occur. Additionally, the compilation process may fail if either of the following conditions is true:

The application contains references to Web controls.
The application contains references to Web pages that are outside the current directory.

To resolve this problem, use one of the following methods:
Back to the top Back to the top
Method 1:
Modify the web.config file
To modify the web.config file, set the batch property of the <compilation> element in the web.config file for the application to false. Compile the application and publish it. It will work.

Note This method is recommended only for small applications. In large production applications, when you set the batch property to false, ASP.NET 2.0 compiles each page in the application into a separate assembly. The individual page assemblies are then loaded at the next available memory location. Additionally, the individual page assemblies cannot be moved. This causes memory fragmentation.

As a solution, you can then set the "batch" property of the <compilation> element back to true or simply remove the "batch" property from the web.config file. This causes the server to flush out the old copy of the dll files and your application will work perfectly.

Method 2: Reorder the folders in the application
To avoid a circular reference, reorder the folders in the application. To reorder these folders, follow these steps:
1. Trace the references to the file and from the file that is indicated by the error message.
2. Identify the circular reference.
3. To avoid the circular reference, put the referenced files together in the same folder.

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# application publishing troubles metamorphium C# 2005 1 May 23rd, 2008 04:23 AM
Error Message when publishing the form Arsi BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5 6 November 19th, 2007 04:25 PM
Error while publishing an InfoPath form to a Share zabi SharePoint Development 0 May 10th, 2007 06:35 AM
Publishing Error gkamckenney Apache Tomcat 0 December 29th, 2005 11:04 PM
parser error (unknown server application) ashokparchuri General .NET 0 February 26th, 2005 04:34 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.