https://bugzilla.novell.com/show_bug.cgi?id=643895

https://bugzilla.novell.com/show_bug.cgi?id=643895#c2


Jonathan Pryor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Jonathan Pryor <[email protected]> 2010-10-11 21:32:05 UTC 
---
This also impacts MonoDroid, as we want consistency.

The problem is that this seemingly innocuous code:


    using (var appStorage = IsolatedStorageFile.GetUserStoreForAssembly ()) {
        Console.WriteLine ("Size = " + appStorage.CurrentSize);
    }

dies even in a console app targeting .NET 2.0:

Unhandled Exception: System.IO.IsolatedStorage.IsolatedStorageException: Unable
to determine application identity of the caller.
   at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope
scope, Type appEvidenceType)
   at
System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope
scope, Type applicationEvidenceType)
   at Test.Main()

The reason is because AppDomain.ActivationContext is null, and this is a
"magic" read-only property which is set by...something (e.g. ClickOnce
deployment initialization, Silverlight app startup code, etc.).

Therefore, to make this work the MonoTouch/MonoDroid startup code needs to do
"something" similar, causing AppDomain.ActivationContext to return non-null so
that System.IO.IsolatedStorage.IsolatedStorage.InitStore() can continue
executing w/o throwing an exception.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to