SALES: 1-800-867-1380

Get or Set Config Details for a Site

Updated: January 15, 2014

You can retrieve the config settings for a web site by issuing an HTTP GET request, or update them by using HTTP PUT with a request body that contains the settings to be updated.


To retrieve or set the configuration settings for a web site, specify the request with GET or PUT as follows. Replace <Subscription-Id>, <WebSpaceName>, and <SiteName> with the corresponding values for your web site.


Method Request URI HTTP Version





URI Parameters


Request Headers

The following table describes required and optional request headers.


Request Header Description


Optional. Specifies the version of the operation to use for this request. If you do not specify a version, the latest version is used. For more information about versioning headers, see API Versioning on the Web Sites Management REST API Reference page.

accept: application/json

Optional. Use this header to receive the response in JSON format.


Required for the PUT operation.

Content-Type: application/json; charset=utf-8

Required if the request body is sent in JSON format.

Request Body

For a PUT operation, specify the values to be changed in the same format as the format used in the response body. For more information, see the Response Body section and Key Elements table later on this page.

The following example request body enables detailed error message logging for site diagnostics by using the <DetailedErrorLoggingEnabled> element:

<SiteConfig xmlns="" xmlns:i="">


The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

A successful operation returns status code 200 (OK).

For information about status codes, see Service Management Status and Error Codes.

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.


Response Header Description


A value that uniquely identifies the request made against the Management service.

Response Body

The following is an example JSON response body for the 2012-10-10 version. Some fields have placeholder values.

    "Name":"String content",
    "Value":"String content"
    "ConnectionString":"String content",
    "Name":"String content",
  "DefaultDocuments": ["Default.htm", "Default.html", "Default.asp", "index.htm", "index.html", "iisstart.htm", "default.aspx", "index.php", "hostingstart.html"],
  "DocumentRoot": null,
    "Arguments":"String content",
    "Extension":"String content",
    "ScriptProcessor":"String content"
    "Name":"String content",
    "Value":"String content"
  "WebSocketsEnabled": false

The following is an example XML response body for the 2012-10-10 version. Some fields have placeholder values.

<SiteConfig xmlns="" xmlns:i="">
      <Name>String content</Name>
      <Value>String content</Value>
      <ConnectionString>String content</ConnectionString>
      <ConnectionString>String content</ConnectionString>
  <DefaultDocuments xmlns:a="">
  <DocumentRoot i:nil="true" />
      <Arguments>String content</Arguments>
      <Extension>String content</Extension>
      <ScriptProcessor>String content</ScriptProcessor>
      <Value>String content</Value>

To retrieve a list of all websites in a webspace, you can issue an HTTP GET request in the following format:<Subscription-Id>/services/WebSpaces/<WebSpaceName>/sites/

For more information, see Get a List of All Web Sites in a Webspace.

Key Elements

The following table describes the key elements of the response body.


Element Name Description


Contains application specific settings in the form of name/value pairs.


Contains connection strings for database and other external resources.


Container element for the information of a single connection string.


A database connection string.


The name of the connection string.


The type of the connection string (for example, "MySQL").


Contains one or more string elements that list, in order of preference, the name of the file that a web site returns when the web site's domain name is requested by itself. For example, if the default document for is default.htm, the page is returned when the browser is pointed to


True if detailed error logging is enabled; otherwise, false.


Not used for Windows Azure Web Sites.


Specifies custom executable programs for handling requests for specific file name extensions.


Container element for a single handler mapping.


A string that contains optional arguments for the script processor specified by the SiteConfig.HandlerMappings.HandlerMapping.ScriptProcessor element.


A string that specifies the extension of the file type that the script processor will handle (for example, *.php).


The absolute path to the location of the executable file that will handle the files specified in the SiteConfig.HandlerMappings.HandlerMapping.Extension element.


True if HTTP error logging is enabled; otherwise, false.


Contains name/value pairs for source control or other information.


The .NET Framework version. Supported values are v2.0 and v4.0.


The number of web workers allotted to the web site. 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.

This value is effectively ignored when the site is in reserve mode.


Supported values are an empty string (an empty string disables PHP), 5.3, and 5.4.


Hash value of the password used for publishing the web site.


The username used for publishing the web site. This is normally a dollar sign prepended to the web site name (for example, “$contoso”).


True if request tracing is enabled; otherwise, false.


Time remaining until request tracing expires.


The source control method that the web site is using (for example, Local Git). If deployment from source control has not been set up for the web site, this value is None.


True if 32-bit mode is enabled; otherwise, false.


Not used for Windows Azure Web Sites.


Any management certificate associated with the subscription specified by <Subscription-Id> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft