Search code examples
c#windows-phone-7isolatedstoragewindows-phone-7-emulator

Automatic login process in Windows Phone 7.1 application


In my Windows Phone application(silverlight application), I want the user to automatically get logged-in to the application once he logs in successfully. I.e I don't want the user to login everytime.

I achieved this through a Isolated Storage file concept. I.e First I created a directory and I created an isolated storage file stream and stored the email and password credentials in some file.
When I stopped debugging and start it back, my stream reader reads the email-password credentials from that file successfully.

My problem is when I close my emulator and open it back I could not read from that file.(particularly, the directory itself does not exist!).I also want to know my Isolated storage persists in real windows phone?

How could I fix this?


Solution

  • This is by design.

    The isolated storage in the emulator is not persisted after you close it.

    Reference: Windows Phone Emulator Scroll down to "Features":

    Important Note:
    Isolated storage is available while the emulator is running. Data in isolated storage does not persist after the emulator closes. This includes files stored in a local database, as these files reside in isolated storage.