c# - 未处理的异常 : The size of the state manager setting value has exceeded the limit

标签 c# uwp windows-10-universal

我们的一些客户看到了这种未处理的异常,我们自己从未经历过或无法重现。

Unhandled exception: The size of the state manager setting value has exceeded the limit (Excep_FromHResult 0x80073DC8)

什么会导致这个异常?

最佳答案

LocalSettings 确实有一些限制,请参阅 ApplicationData.LocalSettings | localSettings property 中的备注 部分:

The name of each setting can be 255 characters in length at most. Each setting can be up to 8K bytes in size and each composite setting can be up to 64K bytes in size.

当设置的尺寸过大时,会抛出这个异常。虽然对设置总数没有一般大小限制,但最好将大型数据集存储到隔离存储中的文件中。所以就像@pstrjds 说的那样,您可能需要验证应用程序中设置的大小,如果其中一些设置可能很大,您可以尝试将它们存储在 LocalFolder 中。

关于c# - 未处理的异常 : The size of the state manager setting value has exceeded the limit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34496371/

相关文章:

logging - Windows 10 UWP 应用程序的记录器

uwp - 如何创建支持 Inking Like OneNote 的 RichEditBox?

c# - 如果应用服务器在 Active Directory A 中,如何查询 Active Directory B

c# - 如何从另一个程序集访问内部静态类?

c# - UWP - 如何从 http 获取文件 (xml)?

c# - 使用参数导航到 VS2015 Windows 10 UWP 中的页面

c# - 如何在 UWP 中散列文件(MD5、SHA..v.v..)

c# - 是否有等同于 VS C# 10 on VS 08 的 CTRL+D, E?

c# - 使用 Microsoft.Office.Interop.Excel 另存为错误导出到 .xlsx

c# - UWP:后台任务中的音频媒体捕获