<?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: Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/42477.aspx</link><pubDate>Mon, 31 Mar 2008 02:56:24 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:42477</guid><dc:creator>jjy2</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/42477.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=42477</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;Yi-Lun Luo - MSFT:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;For now, a workaround is to cache the isolated storage path in the Startup event&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Thanks!. That worked nicely. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/42471.aspx</link><pubDate>Mon, 31 Mar 2008 02:23:35 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:42471</guid><dc:creator>Yi-Lun Luo - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/42471.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=42471</wfw:commentRss><description>&lt;p&gt;Thanks for reporting this issue. I&amp;#39;ve verified it&amp;#39;s a known bug, and will&amp;nbsp;probably be fixed.&lt;/p&gt;
&lt;p&gt;For now, a workaround is to cache the isolated storage path in the Startup event, or handle the html window.onunload event instead of Silverlight&amp;#39;s Exit event.&lt;/p&gt;</description></item><item><title>Re: Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/42363.aspx</link><pubDate>Sun, 30 Mar 2008 13:06:41 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:42363</guid><dc:creator>jjy2</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/42363.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=42363</wfw:commentRss><description>&lt;p&gt;Oh, It wasn’t exactly StartUp when isolated stored file is first accessed.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Here is what I did. &lt;br /&gt;1. OnStartUp -&amp;gt; Download files&lt;br /&gt;2. After last &lt;span style="FONT-SIZE:10pt;COLOR:#2b91af;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:&amp;#39;MS Mincho&amp;#39;;mso-fareast-theme-font:minor-fareast;mso-no-proof:yes;mso-ansi-language:EN-AU;mso-fareast-language:JA;mso-bidi-language:AR-SA;"&gt;OpenReadCompletedEventHandler &lt;/span&gt;is called, I read Isolated Storage file &lt;br /&gt;3.&amp;nbsp; On Exit -&amp;gt; Save some data&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then IsolatedStorageFile.GetUserStoreForApplication() return file that is pointing different directory &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/42361.aspx</link><pubDate>Sun, 30 Mar 2008 12:55:00 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:42361</guid><dc:creator>jjy2</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/42361.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=42361</wfw:commentRss><description>&lt;p&gt;&lt;br /&gt;I have the same problem. &lt;/p&gt;
&lt;p&gt;I was examining IsolaedStorageFile&amp;#39;s property in debugger &lt;/p&gt;
&lt;p&gt;It seems &lt;font color="#cc0000"&gt;IsolatedStorageFile.GetUserStoreForApplication()&lt;/font&gt; return file that is pointing different directory on StartUp and Exit &lt;br /&gt;&lt;br /&gt;I copied below from debug window. &lt;/p&gt;
&lt;p&gt;StartUp, IsolatedStorageFile&amp;#39;s &lt;br /&gt;m_StorePath = “…Silverlight\is\c3jsgwwy.eat\kwqicyij.jjn\s\&lt;font color="#ff0000"&gt;l10oe2qfpbbupah25l1afe05gkihskbs&lt;/font&gt;&lt;font color="#cc0000"&gt;&lt;/font&gt;”&lt;br /&gt;RootDirectory = &amp;quot;…Silverlight\is\c3jsgwwy.eat\kwqicyij.jjn\s\l10oe2qfpbbupah25l1afe05gkihskbs\f&amp;quot;&lt;/p&gt;
&lt;p&gt;On Exit &lt;br /&gt;m_StorePath = “…Silverlight\is\c3jsgwwy.eat\kwqicyij.jjn\s\&lt;font color="#cc0000"&gt;ceapnxl33xmtzpg24xtnwfqgewum3eiz&lt;/font&gt;”&lt;br /&gt;RootDirectory = &amp;quot;… Silverlight\is\c3jsgwwy.eat\kwqicyij.jjn\s\ceapnxl33xmtzpg24xtnwfqgewum3eiz\f &amp;quot;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I am using VISTA Ultimate &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/40582.aspx</link><pubDate>Mon, 24 Mar 2008 21:03:32 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:40582</guid><dc:creator>bpatters</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/40582.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=40582</wfw:commentRss><description>&lt;p&gt;That is pretty much exactly what I was doing. The only difference was the filename and content I was writing. It must be environmental if that works for you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;m running Windows Vista Ultimate and I have UAC enabled. Perhaps it&amp;#39;s the UAC? I can try turning it off when I get home and see if it works.&lt;/p&gt;
&lt;p&gt;The part that was failing for me (I stepped through it in the debugger) was the file.Exists(&amp;quot;usersettings.xml&amp;quot;) line of code during my LoadSettings method was always returning false. In order to debug this I added the following line to the app exit and start code just after creating the IsolatedStorageFileStream:&lt;/p&gt;
&lt;p&gt;string[] files = file.getFileNames();&lt;/p&gt;
&lt;p&gt;and then stepped through with the debugger. The exit code (where the file was created) would show&amp;nbsp;a list with 1 element of &amp;quot;usersettings.xml&amp;quot; in it, and the startup code where I loaded it&amp;nbsp;would show an empty files list at all times. I then moved my LoadSettings() and SaveSettings() methods around until it worked. Which was inside the Page constructor for Load&amp;nbsp;(and the save is in the settings object when a property changes).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/40378.aspx</link><pubDate>Mon, 24 Mar 2008 10:14:16 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:40378</guid><dc:creator>Yi-Lun Luo - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/40378.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=40378</wfw:commentRss><description>&lt;p&gt;Hello, can you post some code? Just tried this and it works. The file is opened successfully in Application.Startup event, and the content &amp;quot;abc&amp;quot; is read successfully.&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; Application_Exit(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IsolatedStorageFile&lt;/font&gt;&lt;font size="2"&gt; file = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IsolatedStorageFile&lt;/font&gt;&lt;font size="2"&gt;.GetUserStoreForApplication();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IsolatedStorageFileStream&lt;/font&gt;&lt;font size="2"&gt; stream = file.CreateFile(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;test.txt&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; s = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;abc&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;byte&lt;/font&gt;&lt;font size="2"&gt;[] b = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Encoding&lt;/font&gt;&lt;font size="2"&gt;.UTF8.GetBytes(s);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;stream.Write(b, 0, b.Length);&lt;/p&gt;
&lt;p&gt;stream.Flush();&lt;/p&gt;
&lt;p&gt;stream.Close();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; Application_Startup(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;StartupEventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IsolatedStorageFile&lt;/font&gt;&lt;font size="2"&gt; file = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IsolatedStorageFile&lt;/font&gt;&lt;font size="2"&gt;.GetUserStoreForApplication();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (file.FileExists(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;test.txt&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;))&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IsolatedStorageFileStream&lt;/font&gt;&lt;font size="2"&gt; stream = file.OpenFile(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;test.txt&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, System.IO.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;FileMode&lt;/font&gt;&lt;font size="2"&gt;.Open);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;byte&lt;/font&gt;&lt;font size="2"&gt;[] b = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;byte&lt;/font&gt;&lt;font size="2"&gt;[stream.Length];&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;stream.Read(b, 0, b.Length);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; s = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Encoding&lt;/font&gt;&lt;font size="2"&gt;.UTF8.GetString(b, 0, b.Length);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;stream.Close();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// Load the main control&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.RootVisual = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Page&lt;/font&gt;&lt;font size="2"&gt;();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Isolated storage bug.</title><link>http://forums.silverlight.net/forums/thread/39412.aspx</link><pubDate>Thu, 20 Mar 2008 22:17:19 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:39412</guid><dc:creator>bpatters</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/39412.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=28&amp;PostID=39412</wfw:commentRss><description>&lt;p&gt;I am writing some simple settings.xml file fro saving some application state (not using ApplicationSettings) and I have the following issues:&lt;/p&gt;
&lt;p&gt;I write out the settings int he Application_exit handler.&lt;/p&gt;
&lt;p&gt;I then try to load them in the Application_startup handler.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The exit handler writes fine. The startup handler see&amp;#39;s not files in the store the next run. However when the second run terminates I can see the previous files in the exit handler.&lt;/p&gt;
&lt;p&gt;It appears the &amp;quot;isolation&amp;quot; level for the files changes depending on where it occurs in your application.&lt;/p&gt;
&lt;p&gt;I moved the Load into my pages constuctory and the save into the object when it&amp;#39;s modified and now they work correctly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In other words if you write files in the exit handler you cannot access them within the scope of the application during runtime.&lt;/p&gt;</description></item></channel></rss>