Failure to Save .Config file using C# on Citrix

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, I have a C# Windows exe which opens a .config file and tries to write some settings and save the file. It works on non Citrix environment. But on Citrix server it fails with following message - <ExceptionInformation xmlns=" <Exception ExceptionType="System.ApplicationException"
Message="Exception occured" Data="System.Collections.ListDictionaryInternal" MachineName="CTRXN" CreatedDateTime="12/6/2011 9:30:03 AM" AppDomainName="WinAp.exe" ThreadIdentityName="" WindowsIdentityName="j5015 <Exception ExceptionType="System.UnauthorizedAccessException"
Message="Attempted to perform an unauthorized operation." Data="System.Collections.ListDictionaryInternal" TargetSite="Int32 SetSecurityInfo(System.Security.AccessControl.ResourceType, System.String, System.Runtime.InteropServices.SafeHandle, System.Security.AccessControl.SecurityInfos,
System.Security.Principal.SecurityIdentifier, System.Security.Principal.SecurityIdentifier, System.Security.AccessControl.GenericAcl, System.Security.AccessControl.GenericAcl)" Source="mscorlib <StackTrace> at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType
type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl) at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections
includeSections, Object exceptionContext) at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections, Object exceptionContext) at System.Security.AccessControl.FileSystemSecurity.Persist(String fullPath)
at System.Configuration.Internal.WriteFileContext.DuplicateTemplateAttributes(String source, String destination) at System.Configuration.Internal.WriteFileContext.DuplicateFileAttributes(String source, String destination) at System.Configuration.Internal.WriteFileContext.Complete(String
filename, Boolean success) at System.Configuration.Internal.InternalConfigHost.StaticWriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions) at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String
streamName, Boolean success, Object writeContext) at System.Configuration.Internal.DelegatingConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext) at System.Configuration.UpdateConfigHost.WriteCompleted(String streamName, Boolean
success, Object writeContext) at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll) </StackTrace></Exception></Exception></ExceptionInformation> Any help in resolving this issue is appreciated.
thanks

View the full article
 
Back
Top