为.NET 4桌面应用程序设置IsolatedStorage配额
此有关存储配额的页面建议使用 mscorcfg 工具。但是 mscorcfg 页面 表示该工具仅适用于旧版本的 .NET
那么....NET 4 为桌面(不是 Silverlight)应用程序设置此值的方法是什么?
This page about storage quotas says to use the mscorcfg tool. BUT the mscorcfg page says the tool is only for older versions of .NET
So... what's the .NET 4 way of setting this value for desktop (not Silverlight) applications?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下这是如何完成的,您似乎需要使用 MageUI。如果您打开应用程序的清单并查看所需权限条目,您将看到它的权限集类型很可能为FullTrust,即没有配额。
如果您将权限集类型更改为 LocalIntranet 或 Internet,您将在详细信息区域中看到一个条目,如下所示:
或者
您可能需要编辑权限集以包含
IsolatedStorageFilePermission
证据,运行您的应用程序,并让它获取/创建用户存储。您可以使用storeadm.exe
工具。
Taking a look at how this is done, it appears you will need to edit the Application Manifest using a tool like MageUI. If you open up your application's manifest and look under the Permissions Required entry you will see that most likely it has the Permission set type of FullTrust, i.e. no quota.
If you change the Permission set type to LocalIntranet or to Internet, you will see an entry in the Details area like so:
Or
You will likely need to edit the Permission set to include the
IsolatedStorageFilePermission
evidence, run your application, and have it Get/Create the User store. You can verify it worked with the proper quota using thestoreadm.exe
tool.IsolatedStorage.IncreaseQuotaTo() 应该是你想要什么...
IsolatedStorage.IncreaseQuotaTo() should be what you want...