Пример #1
0
        /// <summary>
        /// Get's a shared directory that will be used to store the ACME challenge responses
        /// </summary>
        /// <returns></returns>
        public string GetWellKnownSharedPathForApplication()
        {
            var result = Path.Combine(this.GetAcmeTemporarySiteRootForApplication(), ".well-known");

            UtilsSystem.DirectoryCreateIfNotExists(result);
            return(result);
        }
Пример #2
0
        /// <summary>
        /// Get a shared site root for the application
        /// </summary>
        /// <returns></returns>
        public string GetAcmeTemporarySiteRootForApplication()
        {
            // Create a phantom website only to serve the file...
            var wellKnownSharedPath = Path.Combine(this.StoragePath, "webroot_" + this.AppId);

            UtilsSystem.DirectoryCreateIfNotExists(wellKnownSharedPath);

            // Grant specific user permissions
            UtilsWindowsAccounts.AddPermissionToDirectoryIfMissing(
                this.Deployment.WindowsUsernameFqdn(),
                wellKnownSharedPath,
                FileSystemRights.ReadAndExecute,
                this.GlobalSettings.directoryPrincipal);

            return(wellKnownSharedPath);
        }