[英](500) Internal Server Error - When sending web request using api
我發送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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.