jimseiwert
asked on
silverlight Asynchronous web service calls
I am trying to call two web service at the same time. I read that I need to use the user state object. Below is my code. Every time I execute them only one returns. The other service returns the error message " an exception occurred during the operation making the result set invalid"
What do I need to change to get these calls to work correctly. Thank you in advance.
What do I need to change to get these calls to work correctly. Thank you in advance.
Public Sub logoncommands()
UserInformation.ReturnUserFullNameAsync(Guid.NewGuid)
UserInformation.ReturnRoleIDAsync(Guid.NewGuid)
End Sub
Private Sub UserNameReturned(ByVal sender As Object, ByVal e As UserInfo.ReturnUserFullNameCompletedEventArgs) Handles UserInformation.ReturnUserFullNameCompleted
Dim g As Guid = e.UserState
Me.lbl_username.Content = Format("Welcome {0}", e.Result.ToString)
End Sub
ASKER
I do have the call backs for the code. I gave one example of the call back up there UserNameReturned is for UserInformation.ReturnUser FullNameCo mpleted
I did not put the other one as I was just showing example of how I am handiling tyhe callback. I am still tying to figure out how to call both webservices at the same time without getting the error message " an exception occurred during the operation making the result set invalid".
I did not put the other one as I was just showing example of how I am handiling tyhe callback. I am still tying to figure out how to call both webservices at the same time without getting the error message " an exception occurred during the operation making the result set invalid".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Correct. I get an error when I call two web services at the same time so if I call service 1 and service 2 before service 1 fails then I get the error. I am trying to find a way to call both services at the same time.
Acording to microsoft I have to pass it a user state object to do this. I tried using GUID as the object but that did not work.
Acording to microsoft I have to pass it a user state object to do this. I tried using GUID as the object but that did not work.
can you debug and see what error your service is throwing.. the code i posted will help you. also are you using FaultException in the server side so that the errors are propagated to the client ?
for eg. for the method, UserInformation.ReturnUser