Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8713559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:22:15+00:00 2026-06-13T05:22:15+00:00

I have a Windows 8 application. This application has several custom-defined classes. I need

  • 0

I have a Windows 8 application. This application has several custom-defined classes. I need to store instances of these instances into Isolated Storage. From my understanding, Isolated Storage has been replaced with ApplicationDataContainer. Currently, I’m trying the following:

public class MyClass
{
  private HttpClient service = new HttpClient();

  public string FirstName { get; set; }

  public DateTime? BirthDate { get; set; }

  public int Gender { get; set; }

  public async Task Save()
  {
    // Do stuff...
  }
}

...

MyClass myInstance = new MyInstance();
// do stuff...

try {
  ApplicationDataContainer storage = ApplicationData.Current.LocalSettings;
  if (storage != null)
  {
    if (storage.Values.ContainsKey("MyKey"))
      storage.Values["MyKey"] = myInstance;
    else
      storage.Values.Add("MyKey", myInstance);
  }
} catch (Exception ex)
{
  MessageDialog dialog = new MessageDialog("Unable to save to isolated storage");
  dialog.ShowAsync();
}

What am I missing. Why is an exception always being thrown. The exception is not very descriptive. Its just a generic System.Exception and the message doesn’t help either. Can someone please help me?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:22:16+00:00Added an answer on June 13, 2026 at 5:22 am

    The exception I get from the code above seems pretty clear:

    Data of this type is not supported.

    Per Accessing app data with the Windows Runtime

    The Windows Runtime data types are supported for app settings.

    Note that there is no binary type. If you need to store binary data, use an application file.

    You can use the ApplicationDataCompositeValue class to group settings that must be treated atomically (but they still need to be supported runtime data types). Scenario 4 of the Application Data Sample covers this.

    In your specific case though, you may want to consider serializing to a file and using app file storage versus settings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume i have a custom Windows application written in C#. This application has only
I have a web application running on Windows IIS. This app has a database
I have a WPF application which has a main window composed from several custom
I have a Windows Application in C#. This application interacts with a remote mySQL
I have created Windows Application. In this, I have multiple tables in dataset, now
I have a C# Windows Form application that contains a menu with this event:
This is my first windows application. I have published my project and here are
I am using C# with a Windows Application Form. In this I have a
I have a windows form without running it in an application. this is the
I have a WTL 8.0 SDI application for Windows Mobile 5. In this contrived

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.