Exemple #1
0
        private static string GetLocalResourcePathAndSetAccess(string localResourceName)
        {
            var resourcePath = AzureRoleEnvironment.GetLocalResourcePath(localResourceName);

            var localDataSec = Directory.GetAccessControl(resourcePath);

            localDataSec.AddAccessRule(new FileSystemAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), FileSystemRights.FullControl, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow));
            Directory.SetAccessControl(resourcePath, localDataSec);

            return(resourcePath);
        }
Exemple #2
0
 public static string GetExecutionLocalResourcePath()
 {
     return(AzureRoleEnvironment.GetLocalResourcePath(ExecutionLocalResource));
 }
Exemple #3
0
 public static string GetSitesLocalResourcePath()
 {
     return(AzureRoleEnvironment.GetLocalResourcePath(SitesLocalResource));
 }