security exception thrown while testing WP8 app Life cycle?

64 Views Asked by At

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?

0

There are 0 best solutions below