Page Issue
Hi Sitefinity,
I have a really odd issue where I have created a page and added a control to this page in edit mode the page looks fine as it does in preview mode however if after publishing I try to navigate to it, it produces a http 500 error with the following error in event viewer:
Event code: 3006 Event message: A parser error has occurred. Event time: 11/3/2011 11:30:24 AM Event time (UTC): 11/3/2011 11:30:24 AM Event ID: 085e309f67db42759319d7c8e6ae4f7a Event sequence: 170 Event occurrence: 5 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT/Ebusiness-1-129647908210844818 Trust level: Full Application Virtual Path: /Ebusiness Application Path: C:\inetpub\wwwroot\eBusiness\ Machine name: APTIFYWEB Process information: Process ID: 6304 Process name: w3wp.exe Account name: APTIFYWEB\Aptify Exception information: Exception type: HttpParseException Exception message: The 'tagname' attribute cannot contain spaces. at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at Telerik.Sitefinity.Web.PageRouteHandler.BuildHttpHandler(RequestContext requestContext) at Telerik.Sitefinity.Web.PageRouteHandler.GetHttpHandler(RequestContext requestContext) at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) at System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)The 'tagname' attribute cannot contain spaces. at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)The 'tagname' attribute cannot contain spaces. at System.Web.UI.Util.GetNoSpaceAttribute(String name, String value) at System.Web.UI.Util.GetNonEmptyNoSpaceAttribute(String name, String value) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) Request information: Request URL: http://192.168.0.7/Ebusiness/membershippayment Request path: /Ebusiness/membershippayment User host address: 192.168.1.10 User: admin Is authenticated: True Authentication Type: Sitefinity Thread account name: APTIFYWEB\Aptify Thread information: Thread ID: 44 Thread account name: APTIFYWEB\Aptify Is impersonating: False Stack trace: at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at Telerik.Sitefinity.Web.PageRouteHandler.BuildHttpHandler(RequestContext requestContext) at Telerik.Sitefinity.Web.PageRouteHandler.GetHttpHandler(RequestContext requestContext) at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) at System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Custom event details: What kind of "control" are you adding to the page? Can you provide the markup?
Hi Craig,
I am adding an ascx control here is the markup:
<script type="text/javascript" language="javascript"> function ShowImage(ImageURL) if (document.getElementById(ImageURL) != undefined) document.getElementById(ImageURL).style.visibility = "visible"; function NewWindow() window.open('TermsAndConditions.aspx','Terms','width=1050px,height=400,scrollbars=yes') </script><asp:Panel ID="pnlProfile" runat="server"> <fieldset class="Outer"> <legend>Profile</legend> <fieldset> <legend>Qualifications</legend> <table class="data-form"> <tr id="trQualifications" runat="server"> <td class="LeftColumn"> <asp:Label ID="label31" runat="server">Qualifications</asp:Label></td> <td class="RightColumn"> <asp:DropDownList ID="ddlQualifications" runat="server" AppendDataBoundItems="true"> <asp:ListItem Value="0" Text="Please Select a Qualification"></asp:ListItem> </asp:DropDownList></td> </tr> <tr id="trDates" runat="server"> <td class="LeftColumn"> <asp:Label ID="label32" runat="server">Date From/To</asp:Label></td> <td class="RightColumn"> <asp:TextBox ID="tbDateFrom" runat="server"></asp:TextBox>/ <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="tbDateFrom" Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid Date from value (dd/mm/yyyy)" Display="None"></asp:CompareValidator> <asp:TextBox ID="tbDateTo" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="tbDateTo" Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid Date To Value (dd/mm/yyyy)"></asp:CompareValidator> </td> </tr> </table> </fieldset> <fieldset id="trPayment" runat="server"> <legend>Payment Details</legend> <table class="data-form"> <tr> <td class="LeftColumn"> Payment Method </td> <td class="RightColumn"> <asp:DropDownList ID="ddlPaymentMethod" runat="server" AutoPostBack="true" AppendDataBoundItems="true"> <asp:ListItem Text="Please Select a Payment Method"></asp:ListItem> </asp:DropDownList> </td> </tr> <tbody id="tbodCC" runat="server" visible="false"> <tr> <td class="LeftColumn"> Card Number</td> <td class="RightColumn"> <asp:TextBox ID="tbCCNo" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Security Number</td> <td class="RightColumn"> <asp:TextBox ID="tbSecNo" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Expiry Date</td> <td class="RightColumn"> <asp:DropDownList ID="ddlMonth" runat="server"> <asp:ListItem Value="1">January</asp:ListItem> <asp:ListItem Value="2">February</asp:ListItem> <asp:ListItem Value="3">March</asp:ListItem> <asp:ListItem Value="4">April</asp:ListItem> <asp:ListItem Value="5">May</asp:ListItem> <asp:ListItem Value="6">June</asp:ListItem> <asp:ListItem Value="7">July</asp:ListItem> <asp:ListItem Value="8">August</asp:ListItem> <asp:ListItem Value="9">September</asp:ListItem> <asp:ListItem Value="10">October</asp:ListItem> <asp:ListItem Value="11">November</asp:ListItem> <asp:ListItem Value="12">December</asp:ListItem> </asp:DropDownList>/<asp:DropDownList ID="ddlYear" runat="server"> </asp:DropDownList></td> </tr> </tbody> <tbody id="tbodDD" runat="server" visible="false"> <%-- <tr id="ddRef" runat="server" visible="false"> <td class="LeftColumn"> Reference</td> <td class="RightColumn"> <asp:TextBox ID="tbRef" runat="server"></asp:TextBox></td> </tr>--%> <tr> <td class="LeftColumn"> Bank Name</td> <td class="RightColumn"> <asp:TextBox ID="tbBankName" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Account Name</td> <td class="RightColumn"> <asp:TextBox ID="tbDDAccountName" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Sort Code</td> <td class="RightColumn"> <asp:TextBox ID="tbSortCode" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Account Number</td> <td class="RightColumn"> <asp:TextBox ID="tbAccountNo" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Address Line 1</td> <td class="RightColumn"> <asp:TextBox ID="tbDDAddLine1" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Address Line 2</td> <td class="RightColumn"> <asp:TextBox ID="tbDDAddLine2" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Address Line 3</td> <td class="RightColumn"> <asp:TextBox ID="tbDDAddLine3" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Town/City</td> <td class="RightColumn"> <asp:TextBox ID="tbDDTown" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> Post Code</td> <td class="RightColumn"> <asp:TextBox ID="tbDDPostCode" runat="server"></asp:TextBox></td> </tr> <tr> <td class="LeftColumn"> County</td> <td class="RightColumn"> <asp:DropDownList ID="ddlDDCounty" runat="server"> </asp:DropDownList></td> </tr> <tr> <td class="LeftColumn"> Country</td> <td class="RightColumn"> <asp:DropDownList ID="ddlDDCountry" runat="server" AutoPostBack="true"> </asp:DropDownList></td> </tr> </tbody> <tbody id="tbodPO" runat="server" visible="false"> <tr> <td class="LeftColumn"> Purchase Order Number</td> <td class="RightColumn"> <asp:TextBox ID="tbPO" runat="server"></asp:TextBox></td> </tr> </tbody> <tr id="trTC" runat="server"> <td> </td> <td> <asp:CheckBox ID="chkTCs" runat="server" Text="Please Read and accept our " /><asp:HyperLink ID="hypLnkTCs" runat="server" Text="Terms and Conditions" CssClass="TandCs"></asp:HyperLink></td> </tr> </table> </fieldset> <asp:Label ID="lblError" runat="server" Visible="false"></asp:Label> <table> <tr> <td> <asp:Button ID="btnSaveOrder" runat="server" Text="Save" /></td> </tr> </table> </fieldset></asp:Panel><asp:Panel ID="pnlNoProfile" runat="server" Visible="false"> <h1> An error has occurred.</h1> <p> We cannot find any details in the system. Please confirm that you have filled in your details on the <a href="NewUser.aspx">New User page</a>.</p></asp:Panel>Hi Guys
Just wondering if anyone has managed to replicate this issue?
Any help or suggestions will be greatly appreciated.
Thanks in advance
Dan
Hello Daniel,
I created an ascx control and pasted your markup inside, then registered the control and it was rendered probably. This means that the problem is not in the markup itself but somewhere else inside your logic. Can you try if this control works on a regular aspx page (not inside Sitefinity), so we can determine if the problem comes from Sitefinity or not.
All the best,Hi Svetoslav,
I have managed to fix the issue it was a bit odd as i have made no changes to the code, just so you are aware I commented out all my vb code to rule out your suggestion.
What I ended up doing was creating a new page and adding the control to the new page and now the issue has gone. I am not sure what caused it in the first place but I made no code changes.
Thanks for all you help
Dan
Hello Daniel,
I'm glad you solved your issue. However, if it turns up again in future or you are able to reproduce it somehow (find a pattern or something that causes it), please get back to me with information on how to reproduce it.
Regards,