You need a POST request to send an HTML page to the server. HTML stores special characters like <, & etc, due to which server error 500 occurs. Request code:
WebClient webClient = new WebClient(); postParametrs = new NameValueCollection(); postParametrs.Add("Body", body); var response = webClient.UploadValues(url, postParametrs); body - the line storing the HTML page, url- address where the request is sent.
How to escape the body string to send its POST request?