Alex Rivera | Logout

What could be causing an XML Parsing Error: no element found?

Asked 2008-11-19T19:33:38.767
21

I recently migrated an ASP site from my dev machine to a live server. All the pages except my FAQ page works just fine, but my FAQ brings up:

XML Parsing Error: no element found
Location: http://geniusupdate.com/GSHelp/faq.aspx
Line Number 1, Column 1:

The only changes I have made were changing the connection string on my SQL page from local to the string specified by my hosting service. Any tips on what I can do to find the root of this issue?

here is the source to my FAQ page:

<%@ Page Language="VB" MasterPageFile="~/theMaster.master" AutoEventWireup="false" CodeFile="faq.aspx.vb" Inherits="faq" Title="Untitled Page" %>
<%@ Import Namespace="sqlstuff" %>
<%@ Import Namespace="functions" %>

<asp:Content ContentPlaceHolderID="page_title" ID="theTitle" runat="server">
    FAQ</asp:Content>
<asp:Content ContentPlaceHolderID="column1_title" ID="col1Title" runat="server">
    <%=faqPageTitle(Request.QueryString("cid"))%></asp:Content>
<asp:Content ContentPlaceHolderID="column1" ID="columnContent" runat="server">

     <p>Click on a question to expand it to see the answer!</p>
     <p><%  If cID >= 0 Then
                Dim theFaq As New List(Of faqContent), iterate As Integer = 0
                theFaq = sqlStuff.getFaqs(cID)
                For Each oFaq As faqContent In theFaq
                    Response.Output.WriteLine("<h4 id={0} class={1}>Q: {2}</h4>", _
                                                 addQuotes("gsSwitch{0}-title", iterate), _
                                                 addQuotes("handCursor"), _
                                                 oFaq.Content.Question)
                    Response.Output.WriteLine("<div id={0} class={1}><string>A: </strong>{2}</div>", _
                                                 addQuotes("gsSwitch{0}", iterate), _
            
Edit
Report

2 Answers

2

I had this problem on all of my pages when I deployed to IIS, solution turned out that the account the app pool was running under didn't have enough privileges to connect and execute database queries

answered 2011-06-22T02:21:58.630
1

I had the same issue. It was caused because I handled exceptions in global.asax, and called Server.ClearError(), without calling a Response.Redirect or similar. I guess, that the code failed and the error was removed, so asp.net could not display an errormessage, nor could could it display the requested page.

I have also received this error, because I overrided the render method of the page, and forgot to call base.render(writer), thus sending an empty page to the browser.

answered 2010-06-22T14:48:51.440

Your Answer