0
當我運行下面的代碼時,出現ex = {「遠程服務器返回錯誤:(500)內部服務器錯誤。」}任何人都可以幫助我解決這個問題...調用restful webservice時出現(500)內部服務器錯誤
HttpWebRequest request = WebRequest.Create("http://project.i-engage.org/tasks/webservices/bugnetservices.asmx/GetCategories?ProjectID=17") as HttpWebRequest;
request.Credentials = new NetworkCredential("rolland", "409cleaner");
request.ContentType = "application/json; charset = utf - 8";
request.Method = "POST";
using (Stream stm = request.GetRequestStream())
{
using (StreamWriter stmw = new StreamWriter(stm))
{
stmw.Write(soap);
}
}
// Get response
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
// Get the response stream
StreamReader reader = new StreamReader(response.GetResponseStream());
// Console application output
Console.WriteLine(reader.ReadToEnd());
}
無法看到服務器代碼或服務器上的詳細消息。你能檢查服務器上的事件查看器嗎? – jrummell
@ jrummell ...我沒有在服務器上找到任何東西 – Tronics
什麼是肥皂在這裏? –