using Microsoft.Web.Administration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OneClickPublishWeb
{
public class IISConfig
{
///
/// 应用程序
///
public MainApplication[] MainApplications { get; set; }
}
///
/// 主程序应用程序
///
public class MainApplication
{
///
/// 物理路径
///
public string PhysicalPath { get; set; }
///
/// 应用程序池名称
///
public string ApplicationPoolName { get; set; }
///
/// 虚拟目录
///
public VDir[] VDir { get; set; }
///
/// 是否设置ssl
///
public bool IsCertificate { get; set; }
///
/// 网站名称
///
public string WebName { get; set; }
///
/// 端口
///
public int Port { get; set; }
///
/// 服务器域名
///
public string ServerDomainName { get; set; }
///
/// 网站目录
///
public string WebsiteDirectory { get; set; }
///
/// 子应用程序
///
public SubApplication[] Applications { get; set; }
///
/// 程序池
///
public ApplicationPool[] ApplicationPools { get; set; }
}
///
/// 子应用程序
///
public class SubApplication
{
///
/// 路径名称
///
public string Path { get; set; }
///
/// 物理路径
///
public string PhysicalPath { get; set; }
///
/// 应用程序池名称
///
public string ApplicationPoolName { get; set; }
///
/// 虚拟目录
///
public VDir[] VDir { get; set; }
}
///
/// 应用程序池
///
public class ApplicationPool
{
///
/// 版本编号 v4.0
///
public string ManagedRuntimeVersion { get; set; }
///
/// 队列长度
///
public int QueueLength { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// 启动模式
///
public StartMode StartMode { get; set; }
///
/// 启用32位应用程序
///
public bool? Enable32BitAppOnWin64 { get; set; }
///
/// 托管管道模式
///
public ManagedPipelineMode ManagedPipelineMode { get; set; }
///
/// CPU
///
public Cpu Cpu { get; set; }
///
/// 回收
///
public Recycling Recycling { get; set; }
///
/// 进程孤立
///
public Failure Failure { get; set; }
///
/// 进程模型
///
public ProcessModel ProcessModel { get; set; }
}
///
/// CPU
///
public class Cpu
{
///
/// Limit = 50000 限制最大CPU 50% , 默认为0
///
public int Limit { get; set; }
///
/// 限制操作
///
public ProcessorAction Action { get; set; }
///
/// 时间间隔(分钟)
///
public int ResetInterval { get; set; }
///
/// 已启用处理器关联
///
public bool? SmpAffinitized { get; set; }
}
///
/// 回收
///
public class Recycling
{
///
/// 发生配置更改时禁止回收
///
public bool? DisallowRotationOnConfigChange { get; set; }
///
/// 禁用重叠回收
///
public bool? DisallowOverlappingRotation { get; set; }
///
/// 生成和回收时间日志条目
///
public RecyclingLogEventOnRecycle[] LogEventOnRecycle { get; set; }
///
/// 定期重启
///
public PeriodicRestart PeriodicRestart { get; set; }
}
///
/// 定期重启
///
public class PeriodicRestart
{
///
/// 固定时间间隔(分钟)
///
public int Time { get; set; }
///
/// 请求限制 默认为零
///
public int Requests { get; set; }
///
/// 虚拟内存限制(KB)
///
public int Memory { get; set; }
///
/// 专用内存限制(KB)
///
public int PrivateMemory { get; set; }
///
/// 特定时间
///
public TimeSpan[] Schedule { get; set; }
}
///
/// 进程孤立
///
public class Failure
{
///
/// 可执行文件
///
public string OrphanActionExe { get; set; }
///
/// 可执行文件参数
///
public string OrphanActionParams { get; set; }
///
/// 已启用
///
public bool? OrphanWorkerProcess { get; set; }
}
///
/// 进程模型
///
public class ProcessModel
{
///
/// Ping间隔(秒)
///
public int PingInterval { get; set; }
///
/// Ping最大响应时间(秒)
///
public int PingResponseTime { get; set; }
///
/// 标识 0 LocalSystem , 1 LocalService , 2 NetworkService, 3 SpecificUser, 4 ApplicationPoolIdentity
///
public ProcessModelIdentityType IdentityType { get; set; }
///
/// 标识 账号
///
public string UserName { get; set; }
///
/// 标识 密码
///
public string Password { get; set; }
///
/// 关闭时间限制(秒)
///
public int ShutdownTimeLimit { get; set; }
///
/// 加载用户配置文件
///
public bool? LoadUserProfile { get; set; }
///
/// 空闲超时操作 0 Terminate / 1 Suspend
///
public int IdleTimeoutAction { get; set; }
///
/// 启动时间限制(秒)
///
public int StartupTimeLimit { get; set; }
///
/// 启用 Ping
///
public bool? PingingEnabled { get; set; }
///
/// 生成进程模型事件日志条目-空闲超时已到
///
public ProcessModelLogEventOnProcessModel LogEventOnProcessModel { get; set; }
///
/// 闲置超时(分钟)
///
public int IdleTimeout { get; set; }
///
/// 最大工作进程数
///
public int MaxProcesses { get; set; }
}
///
/// 虚拟目录
///
public class VDir
{
///
/// 虚拟目录名称
///
public string DirName { get; set; }
///
/// 物理路径
///
public string PhysicalPath { get; set; }
}
}