kullanırken oturumun tutulması Projemde C# uygulama istemcisi ve tomcat6 web uygulama sunucusu kullanıyorum. C# istemci bu pasajı yazdı: Ben bu yöntemi çağırmakHttpWebRequest
public bool isServerOnline()
{
Boolean ret = false;
try
{
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(VPMacro.MacroUploader.SERVER_URL);
req.Method = "HEAD";
req.KeepAlive = false;
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
if (resp.StatusCode == HttpStatusCode.OK)
{
// HTTP = 200 - Internet connection available, server online
ret = true;
}
resp.Close();
return ret;
}
catch (WebException we)
{
// Exception - connection not available
Log.e("InternetUtils - isServerOnline - " + we.Status);
return false;
}
}
her şey, ben sunucu tarafında yeni bir oturum olsun. Sanırım, istemcimde HTTP çerezleri kullanmalıyım. Ama bunu nasıl yapacağımı bilmiyorum, bana yardım edebilir misin?
İyi soru! Geçiş seansları beni geçmişte tuttu. – Ivo
Ve bu sorunu çözdünüz mü? – CeccoCQ
Guillaume önerisini daha sonra – Ivo