我正在发送 Web 请求并收到内部服务器错误:500。
我怎么能确定哪一方负责得到这个错误?我这边还是外部api那边?
我没有在事件查看器中看到日志。
这是我的代码:
var request = WebRequest.Create("http://saas.appoxee.com/api/") as HttpWebRequest;
request.Method = WebRequestMethods.Http.Post;
request.ContentType = "application/json";
// Add the content to the request
string postDataJsonFormat = CreateExampleTagRequest();
byte[] byteArray = Encoding.UTF8.GetBytes(postDataJsonFormat);
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
// Getting and processing the response
var response = request.GetResponse() as HttpWebResponse;