【发布时间】:2011-11-17 01:22:24
【问题描述】:
这是 Google Chrome 服务的 POST 消息: 我想从 C# 发布这条 POST 消息:
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 错误消息,请检查此并查看 stackoverflow.com/questions/4098945/…