CSApplicationRestartSite Method (ConnectionId, SessionId) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Restarts the website.

Namespace: ContentStudio
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void RestartSite(
	ConnectionId connectionId,
	SessionId sessionId
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the users session. This value usually originates from a call to OpenSession(ConnectionId).
Exceptions

ExceptionCondition
ApplicationExceptionThe setting File_Path was found but was empty.
CSExceptionPermission to restart the site was not granted to the caller.
SqlExceptionThe communication with the underlying database was not successful or the database installation is not correctly configured.
FileNotFoundExceptionContent Studio was unable to locate the Site.dat file in the Bin subdirectory.
SecurityExceptionThe Content Studio runtime does not have the required permission in the file system.
Content Studio permissions

The caller must have either the GlobalGroupAdmin or the RestartWebSite global group right in order to successfully execute this method.
Remarks

Technically, a restart is performed by writing a single byte in the Site.dat file located in the Bin subdirectory of the site. When ASP.NET sees that a file has been touched in the Bin directory it restarts and recompiles the web site.
See Also

Reference