D
Dan Diephouse
I am trying to create an Asynchronous web service client. My code is as
follows:
protected void SynchronizeTerminal()
{
SecureMobileDelivery s = new SecureMobileDelivery(Username, Password);
progressControl.InvokeHandler(new
EventHandler(progressControl.SyncingTerminal));
IAsyncResult r = s.BegingetTerminal( new
AsyncCallback(SynchronizeTerminalEnd), s );
}
protected void SynchronizeTerminalEnd(IAsyncResult r)
{
SecureMobileDelivery s = (SecureMobileDelivery)r.AsyncState;
lock(this.terminal)
{
this.terminal = s.EndgetTerminal(r);
}
}
When this code runs I get a System.ArgumentNullException when the
callback trys to run the SynchronizeTerminalEnd method. Why would the
IAsyncResult be null? I'ved looked at the wire and all my messages are
the exact same as when I ran the non async methods.
Thanks,
Dan Diephouse
follows:
protected void SynchronizeTerminal()
{
SecureMobileDelivery s = new SecureMobileDelivery(Username, Password);
progressControl.InvokeHandler(new
EventHandler(progressControl.SyncingTerminal));
IAsyncResult r = s.BegingetTerminal( new
AsyncCallback(SynchronizeTerminalEnd), s );
}
protected void SynchronizeTerminalEnd(IAsyncResult r)
{
SecureMobileDelivery s = (SecureMobileDelivery)r.AsyncState;
lock(this.terminal)
{
this.terminal = s.EndgetTerminal(r);
}
}
When this code runs I get a System.ArgumentNullException when the
callback trys to run the SynchronizeTerminalEnd method. Why would the
IAsyncResult be null? I'ved looked at the wire and all my messages are
the exact same as when I ran the non async methods.
Thanks,
Dan Diephouse