The following code causes my vs 2008 wpf project to hang, I'm not sure why. Both Part 1 and Part 2 work perfectly fine independently, but when I run them together on an control event (click a button for example) the program hangs. I've also tried shell execute for part 2 - same results. However, this code when run within the form loaded event works fine. Any insights would be truly appreciated.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
'Part 1
Dim myWebClient As System.Net.WebClient = New System.Net.WebClient
Dim CurrentDataFileContents As String = myWebClient.DownloadString("http://www.xyz.com")
myWebClient.Dispose()
'Part 2
System.Diagnostics.Process.Start("http://www.test.com")
End Sub