Hi,
I use CookComputing.XmlRpc;
Trying to connect to trac using some requests but I get this:
System.Net.WebExceptionStatus.ReceiveFailure
{"The underlying connection was closed: An unexpected error occurred on a receive."}
{"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."}
A- when I run my application using Visual Studio 2008, the error is intermittent.
B- when I run my compiled application it never works.
C- when I use fiddler to listen, my application always works (from visual studio or compiled)
This is what I use:
//Trac Code
[XmlRpcUrl("http://trac:8080/Project/login/xmlrpc")]
public interface Trac : IXmlRpcProxy
{
[XmlRpcMethod("ticket.query")
int[] query(string queryStr);
[XmlRpcMethod("ticket.get")]
object[] get(int id);
}
Usage:
//sometimes it fails here:
int[] a = proxy.query("status!=closed&owner=" + user);
//sometimes here:
foreach (int ticketid in a)
{
tickets.Add((proxy.get(ticketid))[3]);
System.Threading.Thread.Sleep(1000);
}