This project is read-only.

System.Reflection.TargetInvocationException was unhandled by user code

Nov 27, 2008 at 7:25 PM

I have VS2008 SP1 installed with the RTW version of the Silverlight Tools.

I'm able to build the solution (release, however if I run it, I receive the "System.Reflection.TargetInvocationException was unhandled by user code" exception.

Any ideas?


Here's the full debug info:

System.Reflection.TargetInvocationException was unhandled by user code
  Message="An exception occurred during the operation, making the result invalid.  Check InnerException for exception details."
       at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       at System.Net.DownloadStringCompletedEventArgs.get_Result()
       at Vertigo.SlideShow.XmlDataProvider.client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
       at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e)
       at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)
  InnerException: System.Net.WebException
       Message="An exception occurred during a WebClient request."
       InnerException: System.NotSupportedException
            Message="The URI prefix is not recognized."
                 at System.Net.WebRequest.Create(Uri requestUri)
                 at System.Net.WebClient.GetWebRequest(Uri address)
                 at System.Net.WebClient.DownloadStringAsync(Uri address, Object userToken)
Nov 27, 2008 at 7:35 PM
Solution: I had to set the "Samples" project as the StartUp project. I can now run the project and see the samples page.