internal WebServerIISExpress(WebServerSettings settings, IFileSystem fileSystem, IEnvironmentSystem environmentSystem, IProcessRunner processRunner) { this._architecture = settings.Architecture; this._fileSystem = fileSystem; this._environmentSystem = environmentSystem; this._processRunner = processRunner; this._hostName = settings.HostName; this._startupTimeout = settings.StartupTimeout; this._rootPhysicalPath = string.IsNullOrEmpty(settings.RootPhysicalPath) ? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) : settings.RootPhysicalPath; this._httpPort = this._environmentSystem.GetNextAvailablePort(); this._serverExecutablePath = LocateIISExpress(); this._applicationHostConfigPath = CreateApplicationHostConfigFromTemplate(); this._serverManager = new ServerManager(_applicationHostConfigPath); InitializeApplicationHostConfig(); Start(); }
internal WebServerIIS(WebServerSettings settings, IFileSystem fileSystem, IEnvironmentSystem environmentSystem) { this._environmentSystem = environmentSystem; this._fileSystem = fileSystem; this._hostName = settings.HostName; this._rootPhysicalPath = string.IsNullOrEmpty(settings.RootPhysicalPath) ? this._environmentSystem.ExpandEnvironmentVariables(@"%SystemDrive%\inetpub\wwwroot") : settings.RootPhysicalPath; this._version = GetIISVersion(); this._serverManager = new ServerManager(); }
public static WebServer Create(WebServerType type, WebServerSettings settings) { WebServer server = null; if (type == WebServerType.IIS) { server = new WebServerIIS(settings); } else { server = new WebServerIISExpress(settings); } return(server); }
public WebServerIISExpress(WebServerSettings settings) : this(settings, Dependencies.FileSystem, Dependencies.EnvironmentSystem, Dependencies.ProcessRunner) { }
public WebServerIIS(WebServerSettings settings) : this(settings, Dependencies.FileSystem, Dependencies.EnvironmentSystem) { }