Guten Tag Zusammen wir haben uns ein Verwaltungsprogramm geschrieben was mehrere Daten nach Knopfdruck an die Mysql Sendet
Nun das Schlimme ist Oft Funktioniert alles Jut aber nach den 4/5/6 mal Hängt sich das programm auf und bekommt ein paar sekunden später ein TimeOut!
Nach Knopfdruck Werden beide Button Gesperrt um eine Serverauslastung zu Verhindern Die Button werden 9Sekunden Gesperrt...
Das ganze ist für den Ls15 Wundert euch nicht das Überall irgendwas mit der Landwirtschaft drin steht xD
EDIT: Ach ja das ganze läuft via PHP um an die Login Daten zu kommen
Ich freue mich über hilfe
Mfg Nick
Nun das Schlimme ist Oft Funktioniert alles Jut aber nach den 4/5/6 mal Hängt sich das programm auf und bekommt ein paar sekunden später ein TimeOut!
Nach Knopfdruck Werden beide Button Gesperrt um eine Serverauslastung zu Verhindern Die Button werden 9Sekunden Gesperrt...
VB.NET-Quellcode
- Try
- Dim request As HttpWebRequest
- 'Kühe
- If (select_animal = "cow") Then
- request = CType(WebRequest.Create("LINK/" + authCode + "/animal_cow_population:" + cow.Text + ",animal_cow_productivity:" + pro.Text + ",animal_cow_manure_pit:" + Label1.Text + ",animal_cow_manure_heap:" + Label15.Text + ",animal_cow_feeding_trough_mixed_ration:" + Label17.Text + ",animal_cow_feeding_trough_silage:" + Label19.Text + ",animal_cow_feeding_trough_grass:" + Label21.Text + ",animal_cow_water:" + Label26.Text + ",animal_cow_straw:" + Label27.Text + ",animal_cow_milk_tank:" + Label23.Text + ""), HttpWebRequest)
- request.Timeout = 100 * 60 * 1000 ' 1 minutes
- Dim WebResponse As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
- End If
- If (select_animal = "sheep") Then
- request = CType(WebRequest.Create("LINK/" + authCode + "/animal_sheep_population:" + Label32.Text + ",animal_sheep_productivity:" + Label37.Text + ",animal_sheep_feeding_trough:" + Label9.Text + ",animal_sheep_wool:" + Label36.Text + ""), HttpWebRequest)
- request.Timeout = 100 * 60 * 1000 ' 1 minutes
- Dim WebResponse As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
- End If
- If (select_animal = "pig") Then
- request = CType(WebRequest.Create("LINK/" + authCode + "/animal_pig_population:" + Label62.Text + ",animal_pig_feeding_trough_mixed_ration:" + Label59.Text + ",animal_pig_feeding_trough_cereals:" + Label57.Text + ",animal_pig_feeding_trough_root_crops:" + Label55.Text + ",animal_pig_water:" + Label51.Text + ",animal_pig_manure:" + Label45.Text + ",animal_pig_liquid_manure:" + Label69.Text + ",animal_pig_young_count:" + Label65.Text + ",animal_pig_killable_count:" + Label68.Text + ",animal_pig_feeding_trough_silage: " + Label53.Text + ""), HttpWebRequest)
- request.Timeout = 100 * 60 * 1000 ' 1 minutes
- Dim WebResponse As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
- End If
- If (select_animal = "beef") Then
- MsgBox("dreck")
- request = CType(WebRequest.Create("LINK/" + authCode + "/animal_beef_productivity" + Label93.Text + ", animal_beef_feeding_trough_root_crops:" + Label86.Text + ",animal_beef_feeding_trough_mixed_ration" + Label90.Text + ",animal_beef_feeding_trough_cereals" + Label88.Text + ",animal_beef_feeding_trough_silage:" + Label86.Text + ",animal_beef_water:" + Label82.Text + ",animal_beef_straw:" + Label78.Text + ",animal_beef_manure:" + Label76.Text + ",animal_beef_liquid_manure:" + Label71.Text + ",animal_beef_young_count:" + Label93.Text + ",animal_beef_killable_count:" + Label73.Text + ""), HttpWebRequest)
- request.Timeout = 100 * 60 * 1000 ' 1 minutes
- Dim WebResponse As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
- End If
- If (select_animal = "chicken") Then
- request = CType(WebRequest.Create("LINK/" + authCode + "/animal_chicken_population:" + Label41.Text + ",animal_chicken_eeg_count:" + Label38.Text + ",animal_chicken_eeg_backpack_count:" + Label43.Text + ""), HttpWebRequest)
- request.Timeout = 100 * 60 * 1000 ' 1 minutes
- Dim WebResponse As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
- End If
- If (select_animal = "goose") Then
- request = CType(WebRequest.Create("LINK/" + authCode + "/animal_goose_productivity" + Label120.Text + ", animal_goose_feeding_trough_root_crops:" + Label117.Text + ",animal_goose_feeding_trough_mixed_ration" + Label115.Text + ",animal_goose_feeding_trough_cereals" + Label113.Text + ",animal_goose_feeding_trough_silage:" + Label111.Text + ",animal_goose_water:" + Label109.Text + ",animal_goose_straw:" + Label105.Text + ",animal_goose_manure:" + Label103.Text + ",animal_goose_young_count:" + Label123.Text + ",animal_goose_killable_count:" + Label100.Text + ""), HttpWebRequest)
- request.Timeout = 100 * 60 * 1000 ' 1 minutes
- Dim WebResponse As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
- End If
- Timer_Set.Enabled = True
- 'Label1.Text = TextBox1.Text
- Button3.Enabled = False
- Button18.Enabled = False
- Button3.Text = "Bitte warten..."
- Button18.Text = "Bitte warten..."
- Catch ex As Exception
- MsgBox(ex.Message)
- End Try
Das ganze ist für den Ls15 Wundert euch nicht das Überall irgendwas mit der Landwirtschaft drin steht xD
EDIT: Ach ja das ganze läuft via PHP um an die Login Daten zu kommen
Ich freue mich über hilfe
Mfg Nick