Silverlight 4 Beta Networking. Part 1 - WebClient and XML
- Posted: Feb 15, 2010 at 3:50 AM
- 14,244 Views
- 9 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- WMV (WMV Video)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
A set of short screencasts providing a "tour" of the network capabilites in the Silverlight 4 beta. We'll look at raw HTTP access, socket access and WCF capabilities.
In this video, we take a look at doing a simple HTTP GET for an XML file with the WebClient API and then reading that with LINQ to XML.
The next video in this series is here.
In this video, we take a look at doing a simple HTTP GET for an XML file with the WebClient API and then reading that with LINQ to XML.
The next video in this series is here.
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Mike,
Thanks for the exmple on how to use WebClient and asynchronous operations from the client. I do however have a question re: this. The web client seems like a great tool by which to use to get media from a site and allow a user to download. however, with the save dialog box doesn't allow itself to be invoked from a non-user initiated event, which contradicts the async approach.
Any recomendations on how to work around this without having to prompt a user multiple times?
Hi BigDubb,
Are you saying that you can't;
Mike's Videos are always very helpful for people like myself - self taught and still learning.
There are many good programmers but few good teachers
Thank you Mr. Taulty
Mike Greenway
Thank you Mr. Greenway - very kind & glad you found these useful
Mike.
A quick note on these videos - they have become a little less relevant with the release of the Silverlight RC.
Be wary of changes that happened between the beta and the RC. Not every video will be affected but some definitely are.
Real shame webClient still has no support for credentials. Just tried RC and it's still not there.
Jon,
Not sure what you mean - WebClient does have support for credentials. Off the top of my head - if you're on the Browser stack then it'll on use default credentials but if you're on the Client stack it can either use default/prompt or take supplied credentials based on the UseDefaultCredentials property.
Is that not what you're seeing?
Mike.
Hi Jon,
Hope you are doing well.
I am developing a solution in WP7 with CRM.
As you know that to access any data in CRM you need to provide user credentials.
So I provide it in the following way.
WebClient Download = new WebClient ();
NetworkCredential creds = new NetworkCredential("username", "password", "domainname" );
Download.Credentials = creds;
Download.DownloadStringCompleted += new DownloadStringCompletedEventHandler
(Download_DownloadStringCompleted);
Download.DownloadStringAsync(new Uri http://servername:5555/organizationname/XRMServices/2011/OrganizationData.svc/LeadSet?$select=FirstName
));
private void Download_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
string Any = e.Result.ToString();
}
}
{
if (e.Error == null
)
can we create silverlight 4.0 pie chart using XML data file?
Remove this comment
Remove this thread
close