Exemplo n.º 1
0
        /// <summary>
        /// 删除指定的虚拟目录
        /// </summary>
        /// <param name="server">服务器名称</param>
        /// <param name="vdName">虚拟目录</param>
        public void DeleteVirtualDirectory(string server, string vdName)
        {
            IISManager iisManager = new IISManager(server);

            try
            {
                iisManager.Connect();
                iisManager.DeleteVirtualDirectory(vdName);
            }
            catch
            {
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取指定版本的升级项目的升级URL
        /// </summary>
        /// <param name="product">项目名称</param>
        /// <param name="version">版本号</param>
        /// <returns>返回指定版本升级项目的升级URL,如果服务器端不存在其路径返回空</returns>
        public string GetUpgradeUrl(string product, string version)
        {
            UpgradeProject project = GetUpgradeProject(product, version);

            if (project != null)
            {
                IISManager iisManager = new IISManager(project.UpgradeServer);
                iisManager.Connect();
                string virtualPath = UPGRADE_PATH + product + "/" + version;
                return(GetUpgradeAbsoluteUrl(virtualPath));
            }
            else
            {
                return(String.Empty);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 获取指定版本的升级项目的升级URL
 /// </summary>
 /// <param name="product">项目名称</param>
 /// <param name="version">版本号</param>
 /// <returns>返回指定版本升级项目的升级URL,如果服务器端不存在其路径返回空</returns>
 public string GetUpgradeUrl(string product, string version)
 {
     UpgradeProject project = GetUpgradeProject(product, version);
     if (project != null)
     {
         IISManager iisManager = new IISManager(project.UpgradeServer);
         iisManager.Connect();
         string virtualPath = UPGRADE_PATH + product + "/" + version;
         return GetUpgradeAbsoluteUrl(virtualPath);
     }
     else
         return String.Empty;
 }
Exemplo n.º 4
0
 /// <summary>
 /// 删除指定的虚拟目录
 /// </summary>
 /// <param name="server">服务器名称</param>
 /// <param name="vdName">虚拟目录</param>
 public void DeleteVirtualDirectory(string server, string vdName)
 {
     IISManager iisManager = new IISManager(server);
     try
     {
         iisManager.Connect();
         iisManager.DeleteVirtualDirectory(vdName);
     }
     catch
     {
     }
 }