Hi ihr..
ich habe Probleme einen asynchronen Web Service mit C# und .Net Framework 4.5 zu realisieren. Leider habe ich bisher noch keine Lösungen gefunden, wie ich die Methodenaufrufe und Funktionen async-gerecht implementieren kann. Vielleicht hat einer von euch schon Erfahrung damit..
Vielen Dank für eure Mühen..
Andi
ich habe Probleme einen asynchronen Web Service mit C# und .Net Framework 4.5 zu realisieren. Leider habe ich bisher noch keine Lösungen gefunden, wie ich die Methodenaufrufe und Funktionen async-gerecht implementieren kann. Vielleicht hat einer von euch schon Erfahrung damit..
Code:
var binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = int.MaxValue; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; var address = new EndpointAddress("http://server:port/Webservice"); WebserviceClient client = new WebserviceClient(binding, address); client.ClientCredentials.UserName.UserName = "UNAME"; client.ClientCredentials.UserName.Password = "PWORD"; WebserviceRequest request = new WebserviceRequest(); request.Nummer = inputNumme.Text; //aus TextBox WebserviceResponse response = await client.WebserviceAsync(request); InfoKlasse Rueckmeldung = response.Return[0]; var _message = Rueckmeldung.Message; showListBlock.Text = _message; //in Ausgabe-TextBox
Vielen Dank für eure Mühen..
Andi
Comment