Ejemplo n.º 1
0
        private static bool ExecuteImageProcessorWebConfigTransform()
        {
            var transFormConfigAction = helper.parseStringToXmlNode("<Action runat=\"install\" undo=\"false\" alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" file=\"~/web.config\" xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/imageprocessor.web.config\">" +
                                                                    "</Action>").FirstChild;

            var transformConfig = new PackageActions.TransformConfig();

            return(transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Executes the configuration transform.
        /// </summary>
        /// <returns>True if the transform is successful, otherwise false.</returns>
        private static bool ExecuteFileSystemConfigTransform()
        {
            XmlNode transFormConfigAction =
                helper.parseStringToXmlNode("<Action runat=\"install\" "
                                            + "undo=\"true\" "
                                            + "alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" "
                                            + "file=\"~/Config/FileSystemProviders.config\" "
                                            + "xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/FileSystemProviders.config\">"
                                            + "</Action>").FirstChild;

            PackageActions.TransformConfig transformConfig = new PackageActions.TransformConfig();
            return(transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction));
        }
Ejemplo n.º 3
0
        private static bool ExecuteMediaWebConfigTransform()
        {
            if (File.Exists(HttpContext.Current.Server.MapPath("~/Media/web.config")))
            {
                XmlNode transFormConfigAction =
                    helper.parseStringToXmlNode("<Action runat=\"install\" "
                                                + "undo=\"true\" "
                                                + "alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" "
                                                + "file=\"~/Media/web.config\" "
                                                + "xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/media-web.config\">"
                                                + "</Action>").FirstChild;

                PackageActions.TransformConfig transformConfig = new PackageActions.TransformConfig();
                return(transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction));
            }

            return(true);
        }
Ejemplo n.º 4
0
        private static bool ExecuteImageProcessorSecurityConfigTransform()
        {
            // Ensure that security.config exists in ~/Config/Imageprocessor/
            if (!File.Exists(ImageProcessorSecurityConfigPath))
            {
                if (!Directory.Exists(ImageProcessorConfigPath))
                {
                    Directory.CreateDirectory(ImageProcessorConfigPath);
                }

                File.Copy(ImageProcessorSecurityDefaultConfigPath, ImageProcessorSecurityConfigPath);
            }

            var transFormConfigAction = helper.parseStringToXmlNode("<Action runat=\"install\" undo=\"false\" alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" file=\"~/config/imageprocessor/security.config\" xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/security.config\">" +
                                                                    "</Action>").FirstChild;

            var transformConfig = new PackageActions.TransformConfig();

            return(transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction));
        }
        private static bool ExecuteImageProcessorWebConfigTransform()
        {
            var transFormConfigAction = helper.parseStringToXmlNode("<Action runat=\"install\" undo=\"false\" alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" file=\"~/web.config\" xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/imageprocessor.web.config\">" +
         "</Action>").FirstChild;

            var transformConfig = new PackageActions.TransformConfig();
            return transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction);
        }
        private static bool ExecuteImageProcessorSecurityConfigTransform()
        {
            // Ensure that security.config exists in ~/Config/Imageprocessor/
            if (!File.Exists(ImageProcessorSecurityConfigPath))
            {
                if (!Directory.Exists(ImageProcessorConfigPath))
                {
                    Directory.CreateDirectory(ImageProcessorConfigPath);
                }

                File.Copy(ImageProcessorSecurityDefaultConfigPath, ImageProcessorSecurityConfigPath);
            }

            var transFormConfigAction = helper.parseStringToXmlNode("<Action runat=\"install\" undo=\"false\" alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" file=\"~/config/imageprocessor/security.config\" xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/security.config\">" +
         "</Action>").FirstChild;

            var transformConfig = new PackageActions.TransformConfig();
            return transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction);
        }