G
Guest
I am working on calling a web service asynchronously with a callback delegate. The web service is returning an error, which I am catching in the callback function. The issue is that the Exception object is returning an empty message. Is this a bug?
CODE:
Here is the initial call
mywebservice.Service1 ws = new mywebservice.Service1();
AsyncCallback cb = new AsyncCallback(WSCallback);
MyState mystate = new MyState(ws,Session.SessionID);
ws.BeginLongRunningTask(15000,cb,mystate);
Here is the Callback
try
{
MyState mystate = (MyState) ar.AsyncState;
mywebservice.Service1 ws = mystate._webservicestate;
TempDataStore.SetRecords(mystate._sessionid,ws.EndLongRunningTask(ar));
}
catch(Exception ex)
{
// The ex.message is empty
this.Label1.Text = ex.Message;
}
Thanks!
CODE:
Here is the initial call
mywebservice.Service1 ws = new mywebservice.Service1();
AsyncCallback cb = new AsyncCallback(WSCallback);
MyState mystate = new MyState(ws,Session.SessionID);
ws.BeginLongRunningTask(15000,cb,mystate);
Here is the Callback
try
{
MyState mystate = (MyState) ar.AsyncState;
mywebservice.Service1 ws = mystate._webservicestate;
TempDataStore.SetRecords(mystate._sessionid,ws.EndLongRunningTask(ar));
}
catch(Exception ex)
{
// The ex.message is empty
this.Label1.Text = ex.Message;
}
Thanks!