public void SaveWebItem(WebAppVirtualDirectory item) { item.ContentPath = fileLookup.SelectedFile; item.RedirectExactUrl = chkRedirectExactUrl.Checked; item.RedirectDirectoryBelow = chkRedirectDirectoryBelow.Checked; item.RedirectPermanent = chkRedirectPermanent.Checked; item.EnableDirectoryBrowsing = chkDirectoryBrowsing.Checked; item.EnableParentPaths = chkParentPaths.Checked; item.EnableWritePermissions = chkWrite.Checked; item.DedicatedApplicationPool = chkDedicatedPool.Checked; item.EnableAnonymousAccess = chkAuthAnonymous.Checked; item.EnableWindowsAuthentication = chkAuthWindows.Checked; item.EnableBasicAuthentication = chkAuthBasic.Checked; item.EnableDynamicCompression = chkDynamicCompression.Checked; item.EnableStaticCompression = chkStaticCompression.Checked; // default documents item.DefaultDocs = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ',')); // redirection item.HttpRedirect = rbLocationRedirect.Checked ? txtRedirectUrl.Text : ""; // set app pool item.ApplicationPool = (string)ViewState["ApplicationPool"]; }
public void SaveSettings(UserSettings settings) { // parking page settings["AddParkingPage"] = chkAddParkingPage.Checked.ToString(); settings["ParkingPageName"] = txtPageName.Text; settings["ParkingPageContent"] = txtPageContent.Text; settings["PublishingProfile"] = PublishingProfileTextBox.Text; settings["EnableParkingPageTokens"] = chkEnableParkingPageTokens.Checked.ToString(); settings["HostName"] = txtHostName.Text.Trim(); // default documents settings["DefaultDocuments"] = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ','));; // general settings settings["EnableWritePermissions"] = chkWrite.Checked.ToString(); settings["EnableDirectoryBrowsing"] = chkDirectoryBrowsing.Checked.ToString(); settings["EnableParentPaths"] = chkParentPaths.Checked.ToString(); settings["EnableDedicatedPool"] = chkDedicatedPool.Checked.ToString(); settings["EnableAnonymousAccess"] = chkAuthAnonymous.Checked.ToString(); settings["EnableWindowsAuthentication"] = chkAuthWindows.Checked.ToString(); settings["EnableBasicAuthentication"] = chkAuthBasic.Checked.ToString(); // extensions settings["AspInstalled"] = chkAsp.Checked.ToString(); settings["AspNetInstalled"] = ddlAspNet.SelectedValue; settings["PhpInstalled"] = ddlPhp.SelectedValue; settings["EnableDynamicCompression"] = chkDynamicCompression.Checked.ToString(); settings["EnableStaticCompression"] = chkStaticCompression.Checked.ToString(); settings["PerlInstalled"] = chkPerl.Checked.ToString(); settings["PythonInstalled"] = chkPython.Checked.ToString(); settings["CgiBinInstalled"] = chkCgiBin.Checked.ToString(); settings["ColdFusionInstalled"] = chkCfExt.Checked.ToString(); settings["CreateCFAppVirtualDirectoriesPol"] = chkVirtDir.Checked.ToString(); // anonymous account policy settings["AnonymousAccountPolicy"] = anonymousUsername.Value; // virtual directories settings["VirtDirNamePolicy"] = virtDirName.Value; // FrontPage settings["FrontPageAccountPolicy"] = frontPageUsername.Value; settings["FrontPagePasswordPolicy"] = frontPagePassword.Value; // secured folders settings["SecuredUserNamePolicy"] = securedUserNamePolicy.Value; settings["SecuredUserPasswordPolicy"] = securedUserPasswordPolicy.Value; settings["SecuredGroupNamePolicy"] = securedGroupNamePolicy.Value; // folders settings["WebRootFolder"] = txtSiteRootFolder.Text; settings["WebLogsFolder"] = txtSiteLogsFolder.Text; settings["WebDataFolder"] = txtSiteDataFolder.Text; settings["AddRandomDomainString"] = chkAddRandomDomainString.Checked.ToString(); }