We have a program that need to be able to run on Local machines, Terminal Servers and Citrix.
While the program is running it need to create some data that are user-specific (Logs), so for that reason I save this in AppData (C:\Users\\AppData\Roaming)
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
I'm pretty sure this works local and TS but what about Citrix. I heard some information that data created in AppData during a session are removed during logoff, but can this really be true. I was under the impression that
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
was the volitile folder (C:\Users\\AppData\Local) while data added to the Roaming folder was persisted from session to session.
Citrix farms are typically designed so that each server is stateless, meaning that every trace of a user session is deleted from the server after that session logged off. Since users obviously hate setting up their environment time and again, often Roaming Profiles are used to copy the user profile from a file server to the Citrix XenApp server during logon and changed files back during logoff before the local copy of the profile is deleted.
In a roaming profile, %LocalAppData% is by default excluded, but %AppData% is not. Storing your application's settings there is safe - it will persist between sessions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With