public void EnvironmentSetUp() { var confSection = DeployerConfigurationSection.Instance; _surveyName = "Test" + TestUtils.GetPostfix(); _surveyPath = Path.Combine(confSection.Settings.Paths.Surveys, _surveyName); _credentials = new Credentials( confSection.Settings.Credentials.Domain, confSection.Settings.Credentials.Login, confSection.Settings.Credentials.Password); _iisInfo = new IISInfo( confSection.Settings.IIS.Version, confSection.Settings.IIS.Address, confSection.Settings.IIS.ApplicationPool, null ); if (confSection.Settings.IIS.Version == "6") Assert.Ignore("No configuration for IIS7"); if (!TryToImpersonate()) Assert.Ignore("Imersonation to '{0}\\{1}' failed", _credentials.Domain, _credentials.Login); if (!TryConnectToIIS(confSection.Settings.IIS.Address)) Assert.Ignore("Connection to '" + _iisInfo.Address + "' IIS7 site failed"); }
public IIS6Manager(IISInfo iisInfo, string surveyName) { _iisInfo = iisInfo; _surveyName = surveyName; }
private void InitializeSettings(DeployerConfigurationSection confSection) { Credentials = new Credentials( confSection.Settings.Credentials.Domain, confSection.Settings.Credentials.Login, confSection.Settings.Credentials.Password); Survey = new Survey(_context.UriName, _context.DatabaseName ?? _context.UriName, _context.Mode); var surveyDir = Path.Combine(confSection.Settings.Paths.Surveys, _context.DirectoryName ?? _context.UriName); SurveyPath = new SurveyPaths(surveyDir, () => Path.Combine(surveyDir, "bin")); PackagePaths = new PackagePaths( Path.Combine(confSection.Settings.Paths.Uploads, _context.UriName + ".zip"), Path.Combine(confSection.Settings.Paths.Backups, _context.UriName + ".zip")); CommonPaths = new CommonPaths( confSection.Settings.Paths.Surveys, confSection.Settings.Paths.Uploads, confSection.Settings.Paths.Backups); DbScriptsPaths = new DbScriptsPaths( confSection.Settings.ScriptsPaths.DbCreate, confSection.Settings.ScriptsPaths.DbValidate, confSection.Settings.ScriptsPaths.DbDelete); Templates = new TemplatesPaths( confSection.Settings.Templates.ConnectionStrings, confSection.Settings.Paths.AdditionalResources.Bins); ConnectionStrings = new ConnectionStrings( ConfigurationManager.ConnectionStrings["master"].ConnectionString, ConfigurationManager.ConnectionStrings["deployer"].ConnectionString); IIS = new IISInfo( confSection.Settings.IIS.Version, confSection.Settings.IIS.Address, confSection.Settings.IIS.ApplicationPool, confSection.Settings.IIS.DirsWithIISAccess == null ? new List<KeyValuePair<string, string>>() : confSection.Settings.IIS.DirsWithIISAccess.Cast<DirElement>() .Select(dir => new KeyValuePair<string, string>(dir.Name, dir.User))); }
public IIISManager CreateIISManager(IISInfo iis, string surveyUri) { return _iismFactory(iis, surveyUri); }