Webservice problem
I have some issues calling webservices. I have a server running on a wireless network that hosts the webservice im trying to access. This webservice has 3 simple methods that return string arrays and a dataset.
My problem is that everyonce in a while the webservice stops responding and the pocket application justs gets stuck, sometimes it will achieve 10 calls sucessfully on a row, and sometimes in the first call it fails.
Any ideas why is this happening, or what am I missing? I tried to add a timer, wait for 10 seconds to get the response and then abort the call, however it didnt work that well.
the code is quite simple:
VinosWeb.VinosWeb dataaccess = and the webservice getPais call: [WebMethod]
int[]lista =this.dataaccess.getPais(param);
{
SqlConnection con =new SqlConnection("workstation id=localhost;packet size=4096;integrated security=SSPI;data source=localhost;persist security info=False;initial catalog=Vino");
String s = "SELECT DISTINCT Pais FROM Vino WHERE Tipo = '"+t+"';";
SqlDataAdapter da =new SqlDataAdapter(s,con);
DataSet ds =new DataSet();
da.Fill(ds);
int[] lista =newint[ds.Tables[0].Rows.Count];
for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
lista[i ] =int.Parse(ds.Tables[0].Rows[i ]["Pais"].ToString());
}
return lista;
}

