Send Server.UrlEncoded XML to querystring Cause of error
I am trying to send an XML string as part of a query string. I used to post this XML, but I post it to a third party system that I cannot POST to.
So, as it seems to me, I need a third party system to request the services of one of the pages on my system. (explanation: a third party system creates PDFs of my web pages. I give it my page url and the PDF page. So the XML file contains the data I need to create the page).
Anyway, I get the query string like this:
string data = Server.UrlEncode(xmlSnippet.ToString());
string sFullUrl = urlString + "?data=" + data;
I provide the 3rd pary system with this url and it calls my page .. except that the request does not reach the page. It doesn't execute an Application_Error handler with this message:
"A potentially dangerous Request.QueryString value was detected from the client (data=[my XML data])"
How do I know the data I am sending is safe, is there a way to do this?
thanks
a source to share
You need to disable Request Validation .
This is a hopelessly broken and ineffective "anti-cross-site scripting" feature that is unfortunately enabled by default in ASP.NET. It will block access for any request containing incoming data that looks like a tag.
a source to share