Page 1 of 1

Error on citrix for normal users

Posted: Fri Sep 30, 2011 8:28 pm
by kslagter


If a NON administrator is the first to start the compiled project on a Citrix-server, then they get a error (see below). Worse the compiled project won't run. It looks like the compiled project tries to read and create a directory in the application data of the all users group and that is not allowed on the Citrix-servers.Why is it doing this and more important how can i fix this? GreetingsKees PS: I'm using PrimalForm2009 Error:Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:Documents and SettingsAll UsersApplication Data[COMPANYNAME[SCRIPTNAME][Version]' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) at System.Windows.Forms.Application.GetDataPath(String basePath) at System.Windows.Forms.Application.get_CommonAppDataPath() at PoshExeHostCmd.Program.RunPowerShell(String[] args) at PoshExeHostCmd.Program.Main(String[] args)
kslagter2011-10-01 04:11:26

Error on citrix for normal users

Posted: Sun Oct 02, 2011 8:18 am
by Alexander Riedel
The problem stems from the .NET framework attempting to create the folder by simply querying a property.
Since the "Application Data" folder is supposed to be accessible for applications to store application specific data I would guess no special precaution was taken.

I have virtually no knowledge about Citrix so I hope you forgive my ignorance in that matter. It seems disabling access to this folder will disable or cripple many applications.

We can handle the exception and roll that out in the next service build.

However, please note that in this case you will not be able to add data files to your executable and the $DataPath variable in your PowerShell script will be empty rather than containing a valid path.

I am not sure at the moment when the next scheduled service build for PF2009 is, so I suggest you check back here in a few days.