using System Security namespace IIS internal interface IIISManager sum

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
using System.Security;
namespace IIS
{
internal interface IIISManager
{
/// <summary>
/// Create new web site node on IIS.
/// </summary>
/// <param name="webSite">New web site name.</param>
/// <param name="hostname">Used host name or IP address associated with web site..</param>
/// <param name="port">Used web site port.</param>
/// <param name="webSitePath">Path to web site on disk.</param>
void CreateWebSiteNode(string webSite, string hostname, int port, string webSitePath);
/// <summary>
/// Create new application pool for web site on IIS.
/// </summary>
/// <param name="applicationPool">Application pool name.</param>
void CreateApplicationPool(string applicationPool);
/// <summary>
/// Create new virtual directory for web site on IIS.
/// </summary>
/// <param name="virtualDirectory">New virtual directory name.</param>
/// <param name="webSite">Web site name.</param>
/// <param name="webSitePath">Path to web site on disk.</param>
void CreateVirtualDirectory(string virtualDirectory, string webSite, string webSitePath);
/// <summary>
/// Switch framework version to 2.0 for selected web site.
/// </summary>
/// <param name="webSite">Web site name.</param>
/// <param name="virtualDirirectory">Virtual directory.</param>
/// <exception cref="FrameworkSwitchException">If failed to switch framework for specified web site.</exception>
/// <exception cref="SecurityException">Thrown if current user has no permissions to read from windows directory.</exception>
/// <exception cref="FrameworkNotFoundException">Thrown if there is no suitable framework on current machine.</exception>
/// <exception cref="WebSiteNotFoundException">Thrown in specified web site not found on IIS server.</exception>
void SwitchNodeFramework(string webSite, string virtualDirirectory);
/// <summary>
/// Set application pool for selected virtual directory.
/// </summary>
/// <param name="virtualDirectory">Virtual directory name.</param>
/// <param name="webSite">Web site name.</param>
/// <param name="applicationPool">New application pool name.</param>
void SetApplicationPool(string virtualDirectory, string webSite, string applicationPool);
/// <summary>
/// Check if virtual directory exists.
/// </summary>
/// <param name="virtualDirectory">Virtual directory name.</param>
/// <param name="webSite">Web site name.</param>
/// <returns>Returns true if virtual directory exists, otherwise returns false.</returns>
bool IsVirtualDirectoryExists(string virtualDirectory, string webSite);
/// <summary>
/// Check if web site with specified name already exists.
/// </summary>
/// <param name="webSite">Web site name.</param>
/// <returns>Returns true if web site exists, otherwise returns false.</returns>
bool IsWebSiteExists(string webSite);
/// <summary>
/// Check if application pool with specified name already exists.
/// </summary>
/// <param name="applicationPool">Application pool name.</param>
/// <returns>Returns true if application pool exists, otherwise returns false.</returns>
bool IsApplicationPoolExists(string applicationPool);
/// <summary>
/// Check if specified port already in use.
/// </summary>
/// <param name="port">Port.</param>
/// <returns>Returns true if specified port already in use, otherwise returns false.</returns>
bool IsPortInUse(int port);
/// <summary>
/// Check if current user has enough rights for temporary asp.net files directory.
/// </summary>
/// <returns>Returns true if user has enough rights, otherwise returns false.</returns>
bool CheckTemporaryDirectoryAccessRights();
/// <summary>
/// Retrieves host name and port for specified web site.
/// </summary>
/// <param name="webSite">Web site name.</param>
/// <param name="hostname">Used host name or IP address.</param>
/// <param name="port">Used port.</param>
/// <exception cref="WebSiteNotFoundException">Thrown in specified web site not found on IIS server.</exception>
void GetWebSiteIpAndPort(string webSite, out string hostname, out int port);
/// <summary>
/// Get Application Pool List
/// </summary>
/// <returns>Application Pool List</returns>
string[] GetApplicationPoolsList();
/// <summary>
/// Get IIS Server Root Web sites List
/// </summary>
/// <returns>IIS Server Root Web List</returns>
string[] GetWebSitesList();
}
}