Creating a RESTful Web Service Using ASP.Net MVC Part 11 – Supporting Incoming XHTML

November 21, 2008 01:05 by admin

In my last post we added functionality to the web service to accept incoming representations in the form of a PUT request. At the end of that post I admitted I hadn’t implemented the functionality to accept an incoming XHTML representation. The problem was with parsing a string of XHTML using .Net’s built in XML parsers. Loading XHTML straight into an XmlReader causes either an, “An error has occurred while opening external DTD” or a, “Reference to undeclared entity” exception.

In this post we’ll crack that problem.

More...