Take the tour ×  I have a RESTful WCF web service.  One of my
methods has an input parameter that is a string.  Some times the
data I am passing to this parameter will include content that
has one or more "illegal characters" - i.e. "&". So, I replace
this with &amp; before passing it to the web service - but it
still throws an exception. The exception isn't visible, as the
data never reaches the web service, but I know that it is this
content that is causing the problem, as I have done several
tests sending data that doesn't contain an illegal XML
character, and every time it worked, but any data containing "&"
will fail. Am I not supposed to replace "&" with &amp;?  Please
refer to the web method below:      public MapNode
AddMapNode(string nodeText)         return new
inProcessEntities().AddMapNode(nodeText);  And here is an
example of how I am calling it:
ExecuteWebMethod("AddMapNode?nodeText='Ben &amp; Jerry'");
Please help on how I can fix this.    share|improve this
question You need to URL Encode yo