0

当我运行下面的代码时,我收到错误,例如 ex = {“远程服务器返回错误:(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());
    }
4

1 回答 1

-2

它与网络服务的问题......他们没有返回身份验证cookie..现在它工作正常。

于 2012-06-20T20:43:15.197 回答