Reputation: 810
I am trying to store values in Isolate Storage through XML serialization. I am getting the error as InvalidOperation Exception error. If i Debug line by line, value from the screen is passing and working fine through this process, variable "xml" is also showing the exact value which i need to get. But in the below page you can see it is showing error at this point. Did I miss anything?
using System.Text;
using System.Xml.Serialization;
private UserModified _User = new UserModified();
private const string USER_KEY = "UserModified";
private void Jogger_JogLoaded(object sender, RoutedEventArgs e)
{
if (IsolatedStorageSettings.ApplicationSettings.Contains(USER_KEY))
GetUser();
this.DataContext = _User;
}
Upvotes: 0
Views: 150
Reputation: 3345
I think the problem is that it should be Encoding.UTF8.GetBytes
not Encoding.Unicode.GetBytes
.
Upvotes: 2