Use the ModifyWebSite procedure of the Managed IIS namespace to modify the properties of a Web site.
This procedure expects to be called with impersonate="1". The procedure impersonates the caller.
<request>
<procedure>
<execute namespace="Managed IIS" procedure="ModifyWebSite">
<executeData>
<IISPath>IIS://myMachine/W3SVC/4</IISPath>
<preferredDomainController>myPrimaryDC.contoso.com </preferredDomainController>
<properties>
<Property name="AccessRead">False</Property>
<Property name="AccessWrite">False</Property>
</properties>
<runState>1</runState>
</executeData>
</execute>
</procedure>
</request>
The following input is valid for this request:
In the <IISPath> element, specify the IIS path of the Web site that you want to modify.
<IISPath>IIS://path of the Web site</IISPath>
In the <properties> element, add or modify the any valid property names and values for this Web site.
<properties>
<Property name="AccessRead"=True|False<Property>
<Property name="AccessWrite"=True|False<Property>
</properties>
In the <runState> element, specify a value of 1 to start the Web site or specify a value of 0 to stop the Web site.
<runState>0|1</runState>
By using the <preferredDomainController> element, you can specify the domain controller you want to use for this request. Using a single preferred domain controller eliminates replication delays that arise between multiple controllers.
This information is optional.
<preferredDomainController>yourPrimaryDomainController.YourHostname.DomainNameExtension</preferredDomainController>
The response to this procedure does not contain significant data.
Important