当前位置: 首页>>代码示例>>C#>>正文


C# Microsoft.Web.Administration.CommitChanges方法代码示例

本文整理汇总了C#中Microsoft.Web.Administration.CommitChanges方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Web.Administration.CommitChanges方法的具体用法?C# Microsoft.Web.Administration.CommitChanges怎么用?C# Microsoft.Web.Administration.CommitChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Web.Administration的用法示例。


在下文中一共展示了Microsoft.Web.Administration.CommitChanges方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EnsureAppPool

        private IIS.ApplicationPool EnsureAppPool(IIS.ServerManager iis, string appName)
        {
            string appPoolName = GetAppPool(appName);
            var kuduAppPool = iis.ApplicationPools[appPoolName];
            if (kuduAppPool == null)
            {
                iis.ApplicationPools.Add(appPoolName);
                iis.CommitChanges();
                kuduAppPool = iis.ApplicationPools[appPoolName];
                kuduAppPool.Enable32BitAppOnWin64 = true;
                kuduAppPool.ManagedPipelineMode = IIS.ManagedPipelineMode.Integrated;
                kuduAppPool.ManagedRuntimeVersion = "v4.0";
                kuduAppPool.AutoStart = true;
                kuduAppPool.ProcessModel.LoadUserProfile = false;
                kuduAppPool.WaitForState(IIS.ObjectState.Started);

                SetupAcls(appName, appPoolName);
            }

            return kuduAppPool;
        }
开发者ID:cburgdorf,项目名称:kudu,代码行数:21,代码来源:SiteManager.cs

示例2: EnsureDefaultDocument

        private static void EnsureDefaultDocument(IIS.ServerManager iis)
        {
            Configuration applicationHostConfiguration = iis.GetApplicationHostConfiguration();
            ConfigurationSection defaultDocumentSection = applicationHostConfiguration.GetSection("system.webServer/defaultDocument");

            ConfigurationElementCollection filesCollection = defaultDocumentSection.GetCollection("files");

            if (!filesCollection.Any(ConfigurationElementContainsHostingStart))
            {
                ConfigurationElement addElement = filesCollection.CreateElement("add");

                addElement["value"] = HostingStartHtml;
                filesCollection.Add(addElement);

                iis.CommitChanges();
            }
        }
开发者ID:bogdansa,项目名称:kudu,代码行数:17,代码来源:SiteManager.cs

示例3: EnsureAppPool

        private static IIS.ApplicationPool EnsureAppPool(IIS.ServerManager iis)
        {
            var kuduAppPool = iis.ApplicationPools["kudu"];
            if (kuduAppPool == null) {
                iis.ApplicationPools.Add("kudu");
                iis.CommitChanges();
                kuduAppPool = iis.ApplicationPools["kudu"];
                kuduAppPool.Enable32BitAppOnWin64 = true;
                kuduAppPool.ManagedPipelineMode = IIS.ManagedPipelineMode.Integrated;
                kuduAppPool.ManagedRuntimeVersion = "v4.0";
                kuduAppPool.AutoStart = true;
            }

            return kuduAppPool;
        }
开发者ID:RaleighHokie,项目名称:kudu,代码行数:15,代码来源:SiteManager.cs

示例4: EnsureAppPool

        private static IIS.ApplicationPool EnsureAppPool(IIS.ServerManager iis, string appName)
        {
            string appPoolName = GetAppPool(appName);
            var kuduAppPool = iis.ApplicationPools[appPoolName];
            if (kuduAppPool == null)
            {
                iis.ApplicationPools.Add(appPoolName);
                iis.CommitChanges();
                kuduAppPool = iis.ApplicationPools[appPoolName];
                kuduAppPool.ManagedPipelineMode = IIS.ManagedPipelineMode.Integrated;
                kuduAppPool.ManagedRuntimeVersion = "v4.0";
                kuduAppPool.AutoStart = true;
                kuduAppPool.ProcessModel.LoadUserProfile = true;
            }

            EnsureDefaultDocument(iis);

            return kuduAppPool;
        }
开发者ID:albertjan,项目名称:kudu,代码行数:19,代码来源:SiteManager.cs

示例5: EnsureAppPool

        private static async Task<IIS.ApplicationPool> EnsureAppPool(IIS.ServerManager iis, string appName)
        {
            string appPoolName = GetAppPool(appName);
            var kuduAppPool = iis.ApplicationPools[appPoolName];
            if (kuduAppPool == null)
            {
                iis.ApplicationPools.Add(appPoolName);
                iis.CommitChanges();
                kuduAppPool = iis.ApplicationPools[appPoolName];
                kuduAppPool.ManagedPipelineMode = IIS.ManagedPipelineMode.Integrated;
                kuduAppPool.ManagedRuntimeVersion = "v4.0";
                kuduAppPool.AutoStart = true;
                kuduAppPool.ProcessModel.LoadUserProfile = true;
                await kuduAppPool.WaitForState(IIS.ObjectState.Started);
            }

            return kuduAppPool;
        }
开发者ID:robzelt,项目名称:kudu,代码行数:18,代码来源:SiteManager.cs


注:本文中的Microsoft.Web.Administration.CommitChanges方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。