Silverlight 4 OOB upgrade process when hosted in Enterprise Portal
Ok, here's the situation. I would like to deploy a silverlight application to Enterprise Portal. Users will gain access to the app by logging into the portal and navigating to the page where it is hosted. This is the easy part.
This Silverlight 4 application is designed to run in No Browser (OOB) mode. My question is, is it possible for the Silverlight OOB update process to fetch updates due to Enterprise Portal authentication?
When I call App.Current.CheckAndDownloadUpdateAsync();
, how can I provide credentials for this HTTP request to succeed?
Any ideas? Is the upgrade process extensible?
Thanks for your help.
a source to share
With Silverlight 4 this should be a possible scenario
In both WebClient and WebRequest classes, you can use Credentials ..
private void DownloadAdditionalThings()
{
WebRequest.RegisterPrefix("http://", System.Net.Browser.WebRequestCreator.ClientHttp);
var client = new WebClient();
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential("username", "password");
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(new Uri("http://blog.gfader.com/"));
}
private void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
string result = e.Result;
}
a source to share