0

I'm developing a WP 8 Application, and by testing the application life cycle i found that it throw exception when i activate the app. ( either by choosing from phone backStack or even by pressing back key),

By tracing i find that it enters Application_Deactivated event but never enter Application_Activated event and throw exception before it, this is the exception:

System.Security.SecurityException was unhandled Message: An unhandled exception of type 'System.Security.SecurityException' occurred in Microsoft.Phone.Interop.ni.dll

In Application_Deactivated event i store: Serialized object in PhoneApplicationService.Current.State and in IsolatedStorageSettings in case it never come back, And in Application_Activated i retrieve them if application instance not preserved

I find that link: is it might happened because of isoSetting storage i used !?

Then,i commented code but the same problem appears, i closed vS2012, closed emulator, clean and rebuild and uninstall app multiple times, and i test another app but its life cycle works fine unlike mine.

when i use device to test, issue disappears.

what is the cause? and is it affect the application?

  • What are you trying to serialize and how are you doing it? Maybe you should provide some code? – Thierry Sep 27 '14 at 00:32
  • I'm trying to serialize _observableCollection_ of items have (string title ..all strings and a dateatime) properties. and I Use `[DataContract] public class MainViewModel : INotifyPropertyChanged` and `public MainViewModel() { this.Items = new ObservableCollection(); } [DataMember] public ObservableCollection Items { get; private set; }` – Dalia Madkour Sep 27 '14 at 00:51

0 Answers0