Last post May 15, 2013 07:17 PM by zeonardo
Feb 22, 2013 07:36 AM|kberawala|LINK
I have created this page and deployed on web server.
Same page works under visual studio server but doesnt work after deployment.
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 'iFrameEmployees', but its type (System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl).
Line 48: <div class="modal-body">
Line 49: <iframe id="iFrameEmployees" style="min-height: 300px;" scrolling="no" frameborder="0" runat="server"></iframe> Line 50: </div>Thanks
Feb 22, 2013 07:49 AM|geniusvishal|LINK
Try to remove the runat=server element and reapply it or try to give another id name or remove the id element..
Refer this knowledge base:
Feb 22, 2013 11:16 AM|ramiramilu|LINK
but its type (System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl).
do this - http://support.microsoft.com/kb/941824
Feb 28, 2013 11:12 PM|kberawala|LINK
I found that, in visual studio if the project is .Net 4.0, iframe with runat server, is System.Web.UI.HtmlControls.HtmlGenericControl
and when project is 4.5, its System.Web.UI.HtmlControls.HtmlIframe.
This is error was happening, because I was trying to deploy .net 4.5 project on web server with .net 4.0.
When I changed the project back to 4.0 and deployed back again, it works.
Also, tested with updating the server with 4.5 and project with 4.5, it works as well.
May 15, 2013 07:17 PM|zeonardo|LINK
You can manualy change the type of the control on the Designer file (yourfile.aspx.designer.cs)
protected global::System.Web.UI.HtmlControls.HtmlIframe iFrameEmployees;
protected global::System.Web.UI.HtmlControls.HtmlGenericControl iFrameEmployees;