locked
Server Error in the application '/ RRS feed

  • Question

  • User755130288 posted

    Hello ,

      I convert the project from 4.0 to 4.5 framework, after convertion every thing is working fine in VS2013 and i checked it by deploying it in my local IIS. every thing is working fine. but when i host it in Client server, i am getting "The base class includes the field 'HTML1', but its type (System.Web.UI.HtmlControls.HtmlElement) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl.) " in masterpage.

    Parse error

    Description: An error occurred during the analysis of a requirement to meet this demand resource. Please see below the details of the error analysis in question and modify your source file appropriately. Message Parser Error: The base class includes the field 'HTML1', but its type (System.Web.UI.HtmlControls.HtmlElement) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl.) Source Error:

    Line 17: 
    Line 18: <DOCTYPE html!>
    Line 19: <html id="Html1" lang="en" runat="server">
     Line 20: <head id="Head1" runat="server">
    Line 21: <meta charset="utf-8" />

    Monday, April 7, 2014 6:08 AM

Answers

  • User-1818759697 posted

    Hi,

    For this situation, the code was written using .NET 4.0 but executed in the .NET 4.5 runtime. From .NET 4.5, Microsoft decided to change the html from a HtmlGenericControl to its own control, a HtmlElement.

    You need to recompile the code using the .net 4.5 runtime. And when doing this, you need to change the *.designer.cs file reference from:

    protected global::System.Web.UI.HtmlControls.HtmlGenericControl html;

    To:

    protected global::System.Web.UI.HtmlControls.HtmlElement html.

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 10, 2014 1:49 AM

All replies