C# 标识silverlight url的内容类型

C# 标识silverlight url的内容类型,c#,silverlight,C#,Silverlight,以下url是我的c#代码的输入: "https://xxxx/sss/ddd/dd/ui/resity/I/Rme/StartPage.html?app.component=/SCT/an/root.uiccwoc&rootWindow=X&redirectUrl=/sp/public/byd/runtime"; 它下载并运行silverlight应用程序。我需要确定它何时开始下载xap文件 有人能推荐代码示例吗 您将Silverlight应用程序下载到哪个平台?也就是说,您的C代码是否在Win

以下url是我的c#代码的输入:

"https://xxxx/sss/ddd/dd/ui/resity/I/Rme/StartPage.html?app.component=/SCT/an/root.uiccwoc&rootWindow=X&redirectUrl=/sp/public/byd/runtime"; 它下载并运行silverlight应用程序。我需要确定它何时开始下载xap文件


有人能推荐代码示例吗

您将Silverlight应用程序下载到哪个平台?也就是说,您的C代码是否在WinForms、WPF、ASP.NET中运行?您使用什么机制(C#类)下载xap数据?@chris:我希望它在winforms中实现。@chris:我是初学者。这是我的第一个项目。我首先尝试解析输入url,以便获得内容类型为“application/x-silverlight”的响应标题。请考虑使用
WebClient
类。它有许多方便的方法从Internet下载数据,包括通知传输进度的事件。考虑使用其<代码> DownloadDataAsync < /代码>(或<代码> DownloadFileAsync <代码> >如果您想自动保存到文件系统),并使用其 Debug PosirsSechange 事件。 "https://xxxx/sss/ddd/dd/ui/resity/I/Rme/StartPage.html?app.component=/SCT/an/root.uiccwoc&rootWindow=X&redirectUrl=/sp/public/byd/runtime";