You can't pass the xml as a parameter because the parameters which you pass to /base are in the url. Same reason why you can't pass a string which contains a / because the url would split it into 2 parameters. For the url I solved it like this:
//Get the url through a post because it can't be passed as a parameter because it contains slashes which don't work with /base.
string url = HttpContext.Current.Server.UrlDecode(HttpContext.Current.Request["url"]);
I encoded the url and posted the value instead of adding it to a string.
Umbraco base XML parameter
Hi ,
i need to have a rest extension that have input parameter an xml .
Will be something like :
public static bool MyRestExtension(string myXmlParameter)
How can i do it ?
I try to encode this url but it's not working , i receive next error :
A potentially dangerous Request.Path value was detected from the client (<).
You can't pass the xml as a parameter because the parameters which you pass to /base are in the url. Same reason why you can't pass a string which contains a / because the url would split it into 2 parameters. For the url I solved it like this:
I encoded the url and posted the value instead of adding it to a string.
Jeroen
is working on a reply...