2
這是POST消息,谷歌Chrome瀏覽器的服務: 我想從C#發佈此POST消息:POST與WebRequest的問題
System.Net.WebRequest req =
System.Net.WebRequest.Create(@"http://www.ччч.ru/SystemService.asmx/VotingFoPhoto");
req.Method = "POST";
req.Timeout = 12000;
req.ContentType = "application/json; charset=UTF-8";
byte[] sentData = Encoding.GetEncoding(1251).GetBytes("photoId=E6A0327A&concursId=3");
req.ContentLength = sentData.Length;
System.IO.Stream sendStream = req.GetRequestStream();
sendStream.Write(sentData, 0, sentData.Length);
sendStream.Close();
req.GetResponse();
當我運行這段代碼,我得到500服務器錯誤。請幫幫我。
鏈接http://www.ччч.ru/SystemService.asmx/VotingFoPhoto無效 –
這是最常見的http錯誤信息,請查看http://stackoverflow.com/questions/4098945/500-我知道內部服務器錯誤在答覆 – 62071072SP
。這是例如。 – GLeBaTi