This may very well be related to a bug I posted earlier (http://silverlight.net/forums/p/19109/65118.aspx).
When running a Silverlight B2 app from a URL other than a relative URL, the WebClient and HttpRequest objects don't raise any events (although oddly enough, I see the requests going out when running Fiddler...), which prevents you from doing things like background-loading of image/media resources. It may very well affect requests to Web Services, etc although I haven't tried that yet.
Here's the steps to repro:
1. Create a new Silverlight B2 application ("MyApp") and select the option to use a Web to test it.
2. Add a zip file named Resource.zip to the root of your Web site
3. Add a TextBlock to the Grid in Page.xaml and name it "downloadStatus"
4. In the constructor of the Page class, add the following code after the call to InitializeComponent():
...
WebClient webClient = new WebClient();
webClient.DownloadProgressChanged
+= new DownloadProgressChangedEventHandler(this.DownloadProgress);
webClient.OpenReadCompleted
+= new OpenReadCompletedEventHandler(this.DownloadCompleted);
webClient.OpenReadAsync(new Uri("../Resource.zip", UriKind.Relative)); // <- Could be anything, really...
this.downloadStatus.Text = "Started download...";
...
5. Add two methods: DownloadProgress, and DownloadCompleted
private void ImageDownloadProgress(Object sender, DownloadProgressChangedEventArgs e)
{
this.downloadStatus.Text = e.ProgressPercentage.ToString();
}
private void DownloadCompleted(Object sender, OpenReadCompletedEventArgs e)
{
this.downloadStatus.Text = "Completed download.";
}
6. Run the application using the standard test page and verify that the TextBlock cycles through the various states.
7. Copy the .XAP to a web server other than the Web in your project (IIS comes in handy here - you can simply place it in wwwroot for the purpose of this repro).
8. Change the Source attribute of the Silverlight control in the test .aspx page to point to the new location (eg: http://localhost/SomeFolder/MyApp.xap)
9. Run the project again. Note that the TextBlock never changes from the "Started" message and no exceptions are thrown. You may also see in Fiddler that the request actually goes out and is served with a 200 result.
Andy Hopper
Senior Consultant
ahopper@wintellect.com