Troubleshoot an "Badly Generated Server Error" on the sharepoint page?

I am trying to edit an outdated sharepoint wss3 site.

Firmware with aspx line with line 700 + code I got "Server tag is not very well formed." error on sharepoint and trick? content = 1 does not work.

Does anyone have a clue on how to get to the line that is causing the problem? I expect something like aspnet ysod, at least useful.

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

Update: I know that the error is due to the fact that I wrapped up the markup, as ArenB kindly notes. What I would like to get is a hint of where there is a mistake on 700 lines.

Update 2:. I found the desktop and posted it as an answer, but the question still remains open when someone gives an answer on how to get a more descriptive error message.

+4
source share
4 answers

Running ctrl+k,d on a page in Visual Studio should give you a rough example of an error. The shortcut tries to format the aspx page for you, and if it is not able to format, it tells you why, by pointing to the line where it found something problematic.

+6
source

The server tag is poorly formed, which means you have a bad tag. I.e:

 <asp:Label id="myLabel" runat="server" Stuff! </asp:Label> 

Note the missing > at the top of the tag

Otherwise, this can happen if you wanted to make the completed <tag /> but forgot / which left you with the missing end tag.


  • As for locating the line, use the diff mechanism to see the changed lines and try to identify the wrong tag.
  • Or you can run xml authentication on the code, although asp can be fancy with the validator validating.
+3
source

Well, I realized that this might be useful to someone, but it is not perfect.

First, take the aspx page code and paste it into another file (as a backup). Then uninstall WebPart on WebPart , then WebPartZones , and then any other possible server-side markup, until the page stops breaking. That way, you at least know where the error is.

For me this time was WebPartZone , which had two attributes together, with no spaces between them. Such errors can be very complex.

I never do this crazy barbaric hack on the sharepoint aspx page again.

+1
source

I fixed my problem thanks to @Aren's answer. My xml was fine, almost. You cannot use "..." inside " " . You must switch to ' .

I wrote:

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

instead:

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

Hope this can save someone else.

+1
source

Source: https://habr.com/ru/post/1308480/


All Articles