本文整理汇总了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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}