<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Report a Silverlight Bug</title><link>http://forums.silverlight.net/forums/28.aspx</link><description>Found a bug in Silverlight? Use this forum to describe the bug and the code or steps to reproduce it.</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Re: WebClient/HttpRequest not working under a .XAP running from a non-relative URL</title><link>http://forums.silverlight.net/forums/thread/67985.aspx</link><pubDate>Thu, 03 Jul 2008 19:29:08 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:67985</guid><dc:creator>ahopper</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/67985.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=67985</wfw:commentRss><description>&lt;p&gt;That does indeed seem to resolve the issue, although I&amp;#39;m puzzled as to why it&amp;#39;s considered to be cross-domain; the zip file is being served from the same site as the .XAP.&lt;/p&gt;
&lt;p&gt;Thanks for your help!&lt;/p&gt;</description></item><item><title>Re: WebClient/HttpRequest not working under a .XAP running from a non-relative URL</title><link>http://forums.silverlight.net/forums/thread/67647.aspx</link><pubDate>Thu, 03 Jul 2008 05:05:27 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:67647</guid><dc:creator>Yi-Lun Luo - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/67647.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=67647</wfw:commentRss><description>&amp;nbsp; 
&lt;p&gt;Hello, thanks for reporting this issue. I&amp;#39;ve verified the problem is: An InvalidOperationExeption is thrown with the message: &amp;quot;Scriptable access is disabled.&amp;quot; I think it is due to a cross domain script access problem, which can&amp;#39;t be solved by a cross domain policy file. But actually we already support this scenario in Beta 2. You need to modify the xap&amp;#39;s manifest. Rename the xap file to a zip file and extract the AppMenifest.xaml. Modify the root tag: Deployment, and add a property as shown below:&lt;/p&gt;
&lt;p&gt;&amp;lt;Deployment xmlns=&amp;quot;http://schemas.microsoft.com/client/2007/deployment&amp;quot; xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot; EntryPointAssembly=&amp;quot;AbsoluteXap&amp;quot; &lt;span class="style1"&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;ExternalCallersFromCrossDomain=&amp;quot;FullAccess&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt; EntryPointType=&amp;quot;AbsoluteXap.App&amp;quot; RuntimeVersion=&amp;quot;2.0.30523.6&amp;quot;&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/Deployment&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then reconstruct the xap file, and test it again with your scenario, and it should work fine.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>WebClient/HttpRequest not working under a .XAP running from a non-relative URL</title><link>http://forums.silverlight.net/forums/thread/67200.aspx</link><pubDate>Wed, 02 Jul 2008 03:52:35 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:67200</guid><dc:creator>ahopper</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/67200.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=67200</wfw:commentRss><description>&lt;p&gt;This may very well be related to a bug I posted earlier (&lt;a href="http://silverlight.net/forums/p/19109/65118.aspx"&gt;http://silverlight.net/forums/p/19109/65118.aspx&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;When running a Silverlight B2 app from&amp;nbsp;a URL other than a relative URL, the WebClient and HttpRequest objects don&amp;#39;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&amp;#39;t tried that yet.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the steps to repro:&lt;br /&gt;1. Create a new Silverlight B2 application (&amp;quot;MyApp&amp;quot;) and select the option to use a Web to test it.&lt;br /&gt;2. Add a zip file named Resource.zip to the root of your Web site&lt;br /&gt;3. Add a TextBlock to the Grid in Page.xaml and name it &amp;quot;downloadStatus&amp;quot;&lt;br /&gt;4. In the constructor of the Page class, add the following code after the call to InitializeComponent():&lt;/p&gt;
&lt;p&gt;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WebClient webClient = new WebClient();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;webClient.DownloadProgressChanged&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; += new DownloadProgressChangedEventHandler(this.DownloadProgress);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;webClient.OpenReadCompleted&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; += new OpenReadCompletedEventHandler(this.DownloadCompleted);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; webClient.OpenReadAsync(new Uri(&amp;quot;../Resource.zip&amp;quot;, UriKind.Relative)); // &amp;lt;- Could be anything, really...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.downloadStatus.Text = &amp;quot;Started download...&amp;quot;;&lt;br /&gt;...&lt;/p&gt;
&lt;p&gt;5. Add two methods: DownloadProgress, and DownloadCompleted&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void ImageDownloadProgress(Object sender, DownloadProgressChangedEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.downloadStatus.Text = e.ProgressPercentage.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void DownloadCompleted(Object sender, OpenReadCompletedEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.downloadStatus.Text = &amp;quot;Completed download.&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;6. Run the application using the standard test page and verify that the TextBlock cycles through the various states.&lt;br /&gt;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).&lt;br /&gt;8. Change the Source attribute of the Silverlight control in the test .aspx page to point to the new location (eg: &lt;a href="http://localhost/SomeFolder/MyApp.xap"&gt;&lt;font color="#3399ff"&gt;http://localhost/SomeFolder/MyApp.xap&lt;/font&gt;&lt;/a&gt;)&lt;br /&gt;9. Run the project again. Note that the TextBlock never changes from the &amp;quot;Started&amp;quot; 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.&lt;/p&gt;</description></item></channel></rss>