[Mono-bugs] [Bug 643895] Support for using Isolated Storage
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Oct 11 17:32:06 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=643895
https://bugzilla.novell.com/show_bug.cgi?id=643895#c2
Jonathan Pryor <jpryor at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jpryor at novell.com
--- Comment #2 from Jonathan Pryor <jpryor at novell.com> 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.
More information about the mono-bugs
mailing list