此代碼適用於Outlook插件。我們試圖張貼到網頁,並收到此錯誤:出現此錯誤:「遠程服務器返回錯誤:(422)無法處理的實體。」當從C#發佈到RoR時
The remote server returned an error: (422) Unprocessable Entity.
的C#代碼是在這裏:
webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
Byte[] postData = asciiEncoding.GetBytes("[email protected]&password=hunter2");
char[] resultHTML = asciiEncoding.GetChars(webClient.UploadData("http://url", "POST", postData));
string convertedResultHTML = new string(resultHTML);
任何想法可能是什麼造成的?
我補充說,但我仍然得到同樣的錯誤返回XML而不是隻非結構化文本解決。我正在訪問軌道控制器上的紅寶石,它什麼也不做,只能通過Outlook插件發佈並呈現一些文本。根本沒有任何邏輯。 – tipu 2011-01-24 12:06:15