<?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>Microsoft, this really needs to be fixed</title><link>http://forums.silverlight.net/forums/thread/238192.aspx</link><pubDate>Fri, 26 Jun 2009 09:00:43 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:238192</guid><dc:creator>martinording</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/238192.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=238192</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;A typical usage patter for OpenFileDialog and IncreaseQuotaTo is this:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;bool&lt;/span&gt; save = &lt;span class="kwd"&gt;false&lt;/span&gt;;
OpenFileDialog dialog = &lt;span class="kwd"&gt;new&lt;/span&gt; OpenFileDialog();
&lt;span class="kwd"&gt;if&lt;/span&gt; (dialog.ShowDialog())
{
    &lt;span class="kwd"&gt;using&lt;/span&gt; (IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication())
    {
        &lt;span class="kwd"&gt;if&lt;/span&gt; (iso.AvailableFreeSpace &amp;lt; dialog.File.Length)
        {
            save = iso.IncreaseQuotaTo(iso.Quota - iso.AvailableFreeSpace + dialog.File.Length);
        }
        &lt;span class="kwd"&gt;else&lt;/span&gt;
            save = &lt;span class="kwd"&gt;true&lt;/span&gt;;
    }
}
&lt;span class="kwd"&gt;if&lt;/span&gt; (save)
{
    &lt;span class="cmt"&gt;// ...&lt;/span&gt;
}&lt;/pre&gt;&lt;p&gt;When IsolatedStorageFile.IncreaseQuotaTo gets called, it is always after a call to OpenFileDialog.ShowDialog.&lt;/p&gt;&lt;p&gt;&lt;b&gt;You really need to allow IncreaseQuotaTo to be called after OpenFileDialog.ShowDialog.&lt;/b&gt; It is the only way to make Silverlight apps user friendly. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/118184.aspx</link><pubDate>Mon, 27 Oct 2008 11:09:09 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:118184</guid><dc:creator>ahura mazda</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/118184.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=118184</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m having the same issue but with the RTW version.&lt;/p&gt;&lt;p&gt;&lt;strike&gt;Using Reflector, I see that the method IncreaseQuotaTo() internally calls a security method that always returns false, which looks like it eventually will cause IncreaseQuotaTo to fail. &lt;/strike&gt;&lt;/p&gt;&lt;p&gt;&lt;strike&gt;Did a bit more research and the call to IncreaseQuotaTo() must be called from an event handler (it states so in the Silverlight SDK). I&amp;#39;m assuming that OpenFileDialog.ShowDialog() probably resets some internal checks and anycalls after to IncreaseQuotaTo() will fail silently.&lt;/strike&gt;&lt;/p&gt;&lt;p&gt;Did even more look ups and found this:&lt;br /&gt;http://www.wilcob.com/Wilco/View.aspx?NewsID=211&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/106881.aspx</link><pubDate>Sun, 12 Oct 2008 07:37:55 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:106881</guid><dc:creator>lilach</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/106881.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=106881</wfw:commentRss><description>&lt;p&gt;our problem is only that the IncreaseQuotaTo returns false without prompting the user. is there a chance that the storage quota was increased even though it didn&amp;#39;t prompt the user?&lt;/p&gt;
&lt;p&gt;we are asking for 200M from the user. 100K will certanly not be enough.&lt;/p&gt;
&lt;p&gt;does anyone know the reason the window fails to open?&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Lilach&lt;/p&gt;</description></item><item><title>Re: OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/104915.aspx</link><pubDate>Wed, 08 Oct 2008 18:12:08 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:104915</guid><dc:creator>kwatts</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/104915.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=104915</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;NinetiesGuy:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;kwatts: The problem isn&amp;#39;t increasing the storage quota. The problem is increasing it&amp;nbsp;after the OpenFileDialog is shown. IncreaseQuotaTo returns false without prompting the user. So if you&amp;#39;re dealing with the file system at all, there&amp;#39;s no way to know how much space you need.&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; &lt;/p&gt;&lt;p&gt;My point is you&amp;#39;re not going to be able to&amp;nbsp; increase the quota beyond 100K in code.&amp;nbsp; The end-user will have to do this manually.&amp;nbsp; I&amp;#39;m guessing there are security concerns here.&lt;/p&gt;&lt;p&gt;-Ken&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/104910.aspx</link><pubDate>Wed, 08 Oct 2008 18:05:39 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:104910</guid><dc:creator>NinetiesGuy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/104910.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=104910</wfw:commentRss><description>&lt;p&gt;Lilach: No, still haven&amp;#39;t found a solution. Our best workaround is to just pick some arbitrary large number and hope that&amp;#39;s big enough. Annoying because I have to error-check everything I do after the dialog closes to ensure there is enough space at that moment. If it worked correctly, I could allocate enough space early in the process and not have to worry about it anymore.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;kwatts: The problem isn&amp;#39;t increasing the storage quota. The problem is increasing it&amp;nbsp;after the OpenFileDialog is shown. IncreaseQuotaTo returns false without prompting the user. So if you&amp;#39;re dealing with the file system at all, there&amp;#39;s no way to know how much space you need.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;</description></item><item><title>Re: OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/104757.aspx</link><pubDate>Wed, 08 Oct 2008 13:04:19 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:104757</guid><dc:creator>kwatts</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/104757.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=104757</wfw:commentRss><description>&lt;p&gt;It turns out that the default limit for isolated storage is now 100 KB, which is down from 1 MB in Silverlight 1.0.&amp;nbsp; This article has more details:&lt;/p&gt;&lt;p&gt;&lt;a href="http://silverlightuk.blogspot.com/2008/02/isolated-storage-in-silverlight-2.html"&gt;http://silverlightuk.blogspot.com/2008/02/isolated-storage-in-silverlight-2.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The good news is this limit can be increased, but it&amp;#39;s something that needs to be done on the user&amp;#39;s end.&amp;nbsp; I hope that this helps!&lt;/p&gt;&lt;p&gt;-Ken&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/104645.aspx</link><pubDate>Wed, 08 Oct 2008 08:26:28 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:104645</guid><dc:creator>lilach</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/104645.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=104645</wfw:commentRss><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;we are now having the same problem, Did you get any information about this?&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Lilach&lt;/p&gt;</description></item><item><title>OpenFileDialog causes IsolatedStorageFile.IncreaseQuotaTo to fail</title><link>http://forums.silverlight.net/forums/thread/85519.aspx</link><pubDate>Mon, 01 Sep 2008 02:18:45 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:85519</guid><dc:creator>NinetiesGuy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/85519.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=85519</wfw:commentRss><description>&lt;p&gt;Hey&amp;nbsp;guys,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using Silverlight 2 beta 2...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After a button click, if you show a file dialog, a call to increase the isolated storage quota will fail without showing the user dialog.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the process I&amp;#39;m trying to get to work:&amp;nbsp;&amp;nbsp;When the user clicks the button, show the file dialog, calculate quota increase based on the selected files, increase quota if necessary, and&amp;nbsp;store files. &lt;/p&gt;
&lt;p&gt;If the call to IsolatedStorageFile.IncreaseQuotaTo is placed before the file dialog, it works as expected. But that isn&amp;#39;t an option because I need to calculate the size needed based on the file dialog result. &lt;/p&gt;
&lt;p&gt;Here&amp;#39;s code to reproduce:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;private void&lt;/span&gt; button_Click(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
{
   &lt;span class="kwd"&gt;using&lt;/span&gt; (IsolatedStorageFile isolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication())
   {
      &lt;span class="cmt"&gt;//this shows increase request dialog&lt;/span&gt;
      isolatedStorageFile.IncreaseQuotaTo(isolatedStorageFile.Quota * 2);
            
      OpenFileDialog openFileDialog = &lt;span class="kwd"&gt;new&lt;/span&gt; OpenFileDialog();
            
      &lt;span class="kwd"&gt;if&lt;/span&gt; (openFileDialog.ShowDialog() == &lt;span class="kwd"&gt;true&lt;/span&gt;)
      {
         &lt;span class="cmt"&gt;//this doesn&amp;#39;t show increase dialog, returns false automatically&lt;/span&gt;
         isolatedStorageFile.IncreaseQuotaTo(isolatedStorageFile.Quota * 2);
      }
   }
}&lt;/pre&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Chris&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>