Programming .NET apps for Citrix/Terminal server: Compliance and Pitfalls
Asked Answered
M

2

7

We are a bit lost here. We need to make our app installable on a network with 80+ Citrix servers. Although our app is 100% valid and working .NET, we've experienced some (for us weird) behavior:

  • You cannot use any "Documents and settings" folders for storing data or settings. Apparently these folders are virtualized and are located in multiple places.
  • Checking if a file exists (i.e., in your own 'program files' folder) doesn't work. Probably for the same reason.

  • Why is the filesystem behaving this way?
  • How do you need to store your data to make an app work on Citrix?
  • Are there any other pitfalls or things you need to know about?
Mirador answered 7/6, 2010 at 11:25 Comment(0)
D
12

A Citrix environment is for practical purposes the same as Remote Desktop Services (used to be Terminal Services) environment.

Microsoft has published Remote Desktop Services Programming Guidelines on MSDN, which is a good starting point to get a feel for what you need to be thinking about.

Microsoft UK Application Development Consulting group has a guide on Developing .NET applications for deployment on Terminal Services or Citrix , which is more performance focused.

You can get free development licenses for Citrix for 12 months, which may be useful for testing.

We've done some deployment to Citrix, and the thing that caught us out must was the Citrix admins fiddling with the permissions for their users. They sometimes broke major parts of Windows, in which case the only thing you can do is log lots :)

good luck!

Detrusion answered 9/6, 2010 at 15:16 Comment(0)
S
3

Sounds like you're not using System.Environment.GetFolderPath(...), which is the correct way to get to the user profile directories. This is the approach I've used in the past with success with Citrix environments.

Sclerenchyma answered 7/6, 2010 at 11:32 Comment(3)
Well that was how we had it first: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) but users reported that didn't work ... We had to make users able to choose their own datafolder ... (Maybe it didn't work because our installer wrote to the wrong folder ??? We were using NSIS, and now use Installshield ?)Mirador
You should be able to create folders in there, if they don't already exist. It may be the case that your installer is putting the files in SpecialFolder.CommonApplicationData rather than each user's SpecialFolder.ApplicationData folder.Sclerenchyma
yeah, true, we had to use SpecialFolder.CommonApplicationData but that isn't the problem ... thanks though!! :-)Mirador

© 2022 - 2024 — McMap. All rights reserved.