Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to troubleshoot "The server tag is not well formed. " error on sharepoint?

I'm trying to edit a legacy wss3 sharepoint site.

Messing around with a 700+ code lines aspx page I got a "The server tag is not well formed." error on sharepoint and The ?content=1 trick does not work.

Anyone has a tip on how to get to the line that's causing the problem? I'm expecting something like the aspnet ysod, at least that's usefull.

If it's worth something, I have access to the actual server.

Update: I know the error is because I screwed up the markup, as ArenB kindly points out. What I would like to get to, is to a hint on where on the 700 lines is the mistake.

Update 2: I found a workarround and posted it as an answer, but the question is still open waiting for someone to give an answer on how to get a more descriptive error message.

like image 255
David Lay Avatar asked Dec 05 '22 02:12

David Lay


2 Answers

Doing ctrl+k,d on the page in Visual Studio should give you an approximation of where the error is. The shortcut attempts to format the aspx page for you, and if it fails to format, it tells you why by pointing you to the line where it found something problematic.

like image 134
khalid13 Avatar answered Dec 25 '22 17:12

khalid13


I fixed my issue thanks to @Aren's answer. My xml was fine, well almost. You can't use "..." inside " ". You have to switch to '.

I wrote:

<asp:Repeater ID="LeadersBlock" runat="server" Visible="false">
    <ItemTemplate>
        <asp:Literal Text="<%# Eval("Employee") %>" />
    </ItemTemplate>
</asp:Repeater>

instead of:

<asp:Repeater ID="LeadersBlock" runat="server" Visible="false">
    <ItemTemplate>
        <asp:Literal Text='<%# Eval("Employee") %>' />
    </ItemTemplate>
</asp:Repeater>

I hope it can save someone else time.

like image 43
aloisdg Avatar answered Dec 25 '22 17:12

aloisdg