<pre lang="c#"> private void Application_Startup(object sender, StartupEventArgs e) { Uri uri = new Uri(GetURL() + "/config.xml", UriKind.Absolute); //Use WebClient to download config.xml and read asynchronously. WebClient Appclient = new WebClient(); Appclient.OpenReadAsync(uri); Appclient.OpenReadCompleted += new OpenReadCompletedEventHandler(Appclient_OpenReadCompleted); void Appclient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { Stream stream = e.Result; // throws an exception here ... }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)