SetVirtualDirectory Method (WMI MSReportServer_ConfigurationSetting)

Sets the name of the virtual directory for a given application.

Public Sub SetVirtualDirectory(ByVal Application As String, _
    ByVal VirtualDirectory As String, ByVal lcid As Int32, _
    ByRef [Error] As String, ByRef HRESULT As Int32)

public void SetVirtualDirectory(string Application, string VirtualDirectory, 
       int Lcid,out string Error, out int HRESULT);


The name of application for which to set the virtual directory.


The name of the virtual directory.


The locale id for the virtual directory.


[out] The description of the error that occurred.


[out] Value indicating whether the call succeeded or failed.

Returns an HRESULT indicating success or failure of the method call. A value of 0 indicates that the method call was successful; an error code indicates the call was not successful.

An application can have only one virtual directory name for all URL reservations.

VirtualDirectory must conform to naming conventions for virtual directories. VirtualDirectory must not be empty string or blank.

Updates the value of the \Configuration\URLReservations\Application\VirtualDirectory element. Succeeds even if no URL reservations have been created yet.

Namespace: root\Microsoft\SqlServer\ReportServer\RS_<EncodedInstanceName>\v10\Admin

Platform: Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2003, Standard Edition; Windows Vista; Windows XP Professional with Service Pack 2 (SP2) or Service Pack 1 (SP1); or Windows 2000 (all versions)

Community Additions