Hi All,
I amusing Power shell scripting language for my deployment.
I would like to give ASPNET User permission for all javascript files available in my website folder. I do not know how do i approch for this.
Could some one help me with the code:
I have got some code (Not sure if it is correct), in C#, but i was not able to convert to Powershell script code.
below is the code:
private static void addFilePermissions ( string backupFile )
{
// Get a FileSecurity object representing the current security settings.
FileSecurity fileSecurity = File.GetAccessControl ( backupFile );
// Add FileSystemAccessRule to the security settings.
fileSecurity.AddAccessRule ( new FileSystemAccessRule ( SQL_EXPRESS_USER_ACCOUNT,
FileSystemRights.Read, AccessControlType.Allow ) );
fileSecurity.AddAccessRule ( new FileSystemAccessRule ( SQL_EXPRESS_USER_ACCOUNT,
FileSystemRights.Write, AccessControlType.Allow ) );
File.SetAccessControl ( backupFile, fileSecurity ); // Set the new access settings.
} // end addBackupFilePermissions
Thanks & Regards
Labhesh S