(500)内部服务器错误 – 使用api发送Web请求时

我发送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; 

500.0 – 内部服务器错误 ”是IIS错误代码,表示Web服务不可用。 这意味着错误在于API,而不是您的客户端。

服务器代码摘要:

1xx – 信息

2xx – 成功

3xx – 重定向

4xx – 客户端错误

5xx – 服务器错误

有关完整代码列表,请访问: http : //support.microsoft.com/kb/943891以及特定于500的代码: http : //support.microsoft.com/kb/942031