Accepted answer

firstly, don't store passwords! ever!

from the other question you just asked, you know how to get the data from the xml.

if you need to persist data across multiple executions of an app then you should save this to isolatedstorage. for your specific scenario i'd recommend using isolatedstoragesettings.

var settings = isolatedstoragesettings.applicationsettings;
settings.add("id", myid);

then access it via

if (settings.contains("id"))
    string stored_value = settings.["id"].tostring();


we recently updated the windows phone developer documentation with guidance specifically related to using web services in windows phone apps. there is also a topic about best practices for security. i hope the following link helps:


it is wise to be cautious with potentially senstive data such as username/passwords and i'm pleased to see the documentation is now alerting developers to this.

security and convenience are requirements to be weighed in the context of the sensitivity of the data that is being protected.

just making it a bit more difficult to obtain a person's credentials may be sufficient in some applications to deter people from making the effort to bypass security measures, particularly if the value of the data or services being protected is low. in this case, offering the convenience of saving credentials for your user may be appreciated.

on the other hand, the data/services being protected may be of high sensitivity/value and concerns of the users phone being physicaly compromised or compromised by unsecure software not obtained via the marketplace may be genuine.

if you are in any doubt, and want to defer the decision to your user, you can always do this by alerting them to the risks and offering them the choice - as browsers and websites do with offering to save your credentials.

either way, this is for you to evaluate in the context of your app.

with regard to where data can be stored, isolated storage is the place to look.

as matt has suggested, isolated storage settings is an approachable place to start, with some of the lifting done for you.

alternatively you may like to just write a file in a format of your own choosing to isolated storage. documentation for all of this is available here.

isolated storage for windows phone

isolated storage overview for windows phone

how to: add files and folders for windows phone namespace ()

Related Query

More Query from same tag