![]() ![]() ![]() TraceFailedRequestsLoggingElement = true LogFileElement = true ĬonfigurationElement traceFailedRequestsLoggingElement = siteDefaultsElement.GetChildElement("traceFailedRequestsLogging") LimitsElement = TimeSpan.Parse("00:02:00") ĬonfigurationElement logFileElement = siteDefaultsElement.GetChildElement("logFile") Using (ServerManager serverManager = new ServerManager())Ĭonfiguration config = serverManager.GetApplicationHostConfiguration() ĬonfigurationSection sitesSection = config.GetSection("system.applicationHost/sites") ĬonfigurationElement siteDefaultsElement = sitesSection.GetChildElement("siteDefaults") ĬonfigurationElement limitsElement = siteDefaultsElement.GetChildElement("limits") This commits the configuration settings to the appropriate location section in the nfig file. You must be sure to set the commit parameter to apphost when you use AppCmd.exe to configure these settings. AppCmd.exe appcmd.exe set config -section:system.applicationHost/sites /:"00:02:00" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"True" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"W3C" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"%SystemDrive%\inetpub\logs\LogFiles" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"True" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"%SystemDrive%\inetpub\logs\FailedReqLogFiles" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"20" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"127.0.0.1:8080:" /commit:apphostĪppcmd.exe set config -section:system.applicationHost/sites /:"True" /commit:apphost The following code samples configure the default limits, logFile, traceFailedRequestsLogging, bindings, and ftpServer options for IIS 7. The following configuration sample specifies the default limits, logFile, traceFailedRequestsLogging, bindings, and ftpServer options for IIS 7. Specifies default settings for logging failed-request traces for sites. Note: This requires installing FTP 7.0 or FTP 7.5.Ĭonfigures default settings to limit the amount of bandwidth, the number of connections, or the amount of time for connections to sites.Ĭonfigures default settings for handling and storage of log files for sites. Specifies default settings for FTP sites. Specifies default bindings for access to sites. Specifies whether the site should start automatically when the Management Service is started. Specifies a friendly name that uniquely identifies a Web site, for example, "Contoso HR Forms." Other Web sites server-assigned numbers that may be composed of multiple digits. Specifies the random numeric identifier that is assigned by IIS when the site is created. ![]() In the Web Site Defaults dialog box, specify your default options for all Web sites, and then click OK. In the server's Sites pane, click Set Web Site Defaults. In the Connections pane, expand the server name, then click the Sites node.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |