This is weird. I added a brand new Web Application project to my solution in Visual Studio 2008.
Created a master page. Made zero modifications. Created a new we
I just encountered this exception and in my case it was cause by a white space between asp:content elements
So, this failed:
<asp:content runat="server" ContentPlaceHolderID="Header">
Header
</asp:content>
<asp:Content runat="server" ContentPlaceHolderID="Content">
Content
</asp:Content>
But removing the white spaces between the elements worked:
<asp:content runat="server" ContentPlaceHolderID="Header">
Header
</asp:content><asp:Content runat="server" ContentPlaceHolderID="Content">
Content
</asp:Content>