Hi,
I have some problems with a BackgroundWorker when calling a WebRequest
:
private void bgrdTask_DoWork(object sender, DoWorkEventArgs e)
{
e.Result = WebServerRequest((string[])e.Arguments);
}
the WebServerRequest function simply creates a HttpWebRequest to the
uri specified in the arguments and returns the StatusDescription if it
is successful or the WebException message.
When I use the GetResponse() method, I always end up with a correct
status description, everything is just fine. But when I use the
asynchronous BeginGetResponse() and EndGetResponse() methods, the
AsyncCallback always throws an "Unable to connect to remote server"
WebException. Is there anything special I have to implement to get
BackgroundWorkers working when they have to call themselves
asynchronous functions ?
thx :)
Ulf