Share via


CanCreateDwsUrl Method

The CanCreateDwsUrl method of the Document Workspace service determines whether the user has sufficient rights to create a Document Workspace site with the proposed URL on the server.

Parameters

url  String. The proposed URL for the new Document Workspace site.

Return Value

String Returns the URL in the format <Result>{proposed URL}</Result> when successful.

Note  The URL may be modified as described in the following section.

Error Values

The following table shows errors that may be returned by the CanCreateDwsUrl method.

Error Code Description
HTTP error code 401 The user does not have sufficient rights.

Remarks

The CanCreateDwsUrl method determines whether the user has sufficient rights to create a Document Workspace site with the proposed URL on the server. This method returns the suggested URL after replacing illegal characters, shortening the the proposed URL as necessary, and appending a numeric index if necessary to make the URL unique. For example, if the proposed URL My_New_Site already exists, the CanCreateDwsUrl method returns My_New_Site(1).

When the user does not have sufficient rights, the HTTP error response raises an exception.

Example

The following code example displays the suggested URL for the new Document Workspace site as returned by the CanCreateDwsUrl method.

Example

Helper Functions

The following sample helper functions are used in the code samples provided for each method of the Document Workspace service.

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://Server_Name/_vti_bin/Dws.asmx