简体   繁体   English

持续在线单击一次应用程序

[英]Persistence on an online click once application

Is there a way to persist an string from an online click once application. 有没有一种方法可以从在线单击一次应用程序中保留字符串。 I saw something about isolated file storage as answers to other questions. 我看到了一些有关隔离文件存储的信息,可以作为其他问题的答案。 But none of them specify if it works also for online apps (I really don't think so). 但是他们都没有指定它是否也适用于在线应用程序(我真的不这么认为)。

I think that something like a cookie will work. 我认为像cookie这样的东西会起作用。 Is there something like that available? 有没有类似的东西可用?

The application must run only online (is triggered with some parameters), but for each user it needs to save a file with specific information asked to him. 该应用程序必须仅在线运行(由某些参数触发),但是对于每个用户,它都需要保存一个文件,其中包含询问他的特定信息。 Once the app runs for the very first time it must not ask for that info to the user. 该应用程序首次运行后,一定不要向用户询问该信息。

Thanks. 谢谢。

You can store the information in LocalApplicationData. 您可以将信息存储在LocalApplicationData中。 Just create a directory with either your application name or your company name, stick the string in a file, and read it from there. 只需使用您的应用程序名称或公司名称创建目录,将该字符串粘贴到文件中,然后从那里读取即可。 This article shows you how to persist this data, and not have it impacted by ClickOnce updates. 本文向您展示了如何持久保存此数据,以及如何使其不受ClickOnce更新的影响。 It will work even though your application is online-only. 即使您的应用程序仅在线,它也可以工作。 (Online-only C/O apps are still installed, it just means it always runs it from the URL, and requires the user to be connected in order to install the app.) (仅在线C / O应用仍在安装中,仅表示它总是从URL运行它,并且要求用户连接才能安装该应用。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM