Update the Configuration Settings of a Site
Applies To: Windows Azure Pack
Updates the configuration settings for a site.
Replace {ServiceMgmt} with your Service Management API endpoint address. Replace {Port} with either 30005 for the tenant API or 30006 for the Public Tenant API. Replace {SUBSCRIPTIONID} with the required subscription identifier. Replace {WEBSPACENAME}, and {NAME} with the corresponding values for your website.
Method | Request URI | HTTP version |
|---|---|---|
PUT | https://<ServiceMgmt>:<Port>/{SUBSCRIPTIONID}/services/webspaces/{WEBSPACENAME}/sites/{NAME}/config | HTTP/1.1 |
None.
The following table describes required and optional request headers.
Request header | Description |
|---|---|
x-ms-version | Required. Specifies the version of the operation to use for this request. This header should be set to 2012-10-10 or the current version. |
Content-Length | Required. |
Content-Type: application/json; charset=utf-8 | Required if the request body is sent in JSON format. |
The code example shows the format of the request body.
{
"AppSettings":[{
"Name":"String content",
"Value":"String content"
}],
"ConnectionStrings":[{
"ConnectionString":"String content",
"Name":"String content",
"Type":0
}],
"DefaultDocuments":["String content"],
"DetailedErrorLoggingEnabled":true,
"DocumentRoot":"String content",
"HandlerMappings":[{
"Arguments":"String content",
"Extension":"String content",
"ScriptProcessor":"String content"
}],
"HttpLoggingEnabled":true,
"LogsDirectorySizeLimit":2147483647,
"Metadata":[{
"Name":"String content",
"Value":"String content"
}],
"NetFrameworkVersion":"String content",
"NumberOfWorkers":2147483647,
"PhpVersion":"String content",
"PublishingPassword":"String content",
"PublishingUsername":"String content",
"RequestTracingEnabled":true,
"RequestTracingExpirationTime":"\/Date(928174800000-0700)\/",
"ScmType":"String content",
"Use32BitWorkerProcess":true,
"WebSocketsEnabled":true
}
The following table describes the key elements of the request body.
Element name | Description | ||
|---|---|---|---|
SiteConfig.AppSettings | Contains application-specific settings in the form of name/value pairs. | ||
SiteConfig.ConnectionStrings | Contains connection strings for database and other external resources. | ||
SiteConfig.ConnectionStrings.ConnStringInfo | Container element for the information of a single connection string. | ||
SiteConfig.ConnectionStrings.ConnStringInfo.ConnectionString | A database connection string. | ||
SiteConfig.ConnectionStrings.ConnStringInfo.ConnectionString.Name | The name of the connection string. | ||
SiteConfig.ConnectionStrings.ConnStringInfo.ConnectionString.Type | The type of the connection string, for example, "MySQL". | ||
SiteConfig.DefaultDocuments | Contains one or more string elements that list, in order of preference, the name of the file that a website returns when the website's domain name is requested by itself. For example, if the default document for http://contoso.com is default.htm, the page http://www.contoso.com/default.htm is returned when the browser is pointed to http://www.contoso.com. | ||
SiteConfig.DetailedErrorLoggingEnabled | If detailed error logging is enabled, it is true; otherwise, it is false. | ||
SiteConfig.DocumentRoot | Not used for Windows Azure Web Sites. | ||
SiteConfig.HandlerMappings | Specifies custom executable programs for handling requests for specific file name extensions. | ||
SiteConfig.HandlerMappings.HandlerMapping | Container element for a single handler mapping. | ||
SiteConfig.HandlerMappings.HandlerMapping.Arguments | A string that contains optional arguments for the script processor that is specified by the SiteConfig.HandlerMappings.HandlerMapping.ScriptProcessor element. | ||
SiteConfig.HandlerMappings.HandlerMapping.Extension | A string that specifies the extension of the file type that the script processor handles, for example, *.php. | ||
SiteConfig.HandlerMappings.HandlerMapping.ScriptProcessor | The absolute path to the location of the executable file that handles the files that are specified in the SiteConfig.HandlerMappings.HandlerMapping.Extension element. | ||
SiteConfig.HttpLoggingEnabled | If HTTP error logging is enabled, it is true; otherwise, it is false. | ||
SiteConfig.Metadata | Metadata that contains name/value pairs for source control or other information. | ||
SiteConfig.NetFrameworkVersion | The Microsoft .NET Framework version. Supported values are v2.0 and v4.0. | ||
SiteConfig.NumberOfWorkers | The number of web workers that are allotted to the website. If the site mode is Free, this value is 1. If the site mode is Shared, this value can range from 1 through 6. If the site mode is Standard, this value can range from 1 through 10.
| ||
SiteConfig.PhpVersion | Supported values are an empty string, 5.3, and 5.4. An empty string disables PHP . | ||
SiteConfig.PublishingPassword | Hash value of the password that is used for publishing the web site. | ||
SiteConfig.PublishingUsername | The user name that is used for publishing the website. This user name is normally a dollar sign that is prepended to the website name, for example, "$contoso". | ||
SiteConfig.RequestTracingEnabled | If request tracing is enabled, it is true; otherwise, it is false. | ||
SiteConfig.RequestTracingExpirationTime | The remaining time until request tracing expires. | ||
SiteConfig.ScmType | The source control method that the website uses, for example, Local Git. If deployment from source control has not been set up for the website, this value is None. | ||
SiteConfig.Use32BitWorkerProcess | If 32-bit mode is enabled, it is true; otherwise, it is false. | ||
WebSocketsEnabled | Not used for Windows Azure Web Sites. |
The response includes an HTTP status code, a set of response headers, and a response body.
A successful operation returns status code 200 (OK).
For information about status codes, see
The response for this operation includes the following headers. The response can also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response Header | Description |
|---|---|
x-ms-request-id | A value that uniquely identifies the request that is made against the management service. |
None.
