CreateVirtualDirectory Method (WMI MSReportServer_ConfigurationSetting Class)
Creates a virtual directory for the report server.
Syntax
Public Sub CreateVirtualDirectory(Name as String, IISPath as String,
ByRef HRESULT as Int32)
public void CreateVirtualDirectory (string Name, string IISPath,
out sint32 HRESULT);
Parameters
- Name
A string containing the name of the virtual directory for the application pool. This name must conform to the standards set by Internet Information Services (IIS) on the computer and must not already exist.
- IISPath
A string containing the IIS path of the Web site on which to create the specified virtual directory.
- HRESULT
[out] Value indicating whether the call succeeded or failed.
Return Value
Returns an HRESULT indicating success or failure of the method call. A value of 0 indicates that the method call was successful. A non-zero value indicates that an error has occurred.
Remarks
When the call to CreateVirtualDirectory is successful, the VirtualDirectory property of this class is updated to indicate the created virtual directory. The virtual directory is set to point to the <PathName>\ReportServer directory where PathName is the value passed in the Name parameter.
A value for IISPath must be specified. The IISpath is stored in the registry when the virtual directory is created.
After successfully calling CreateVirtualDirectory, you must call the SetWebServiceIdentity method to set the user identity and the application pool in which the virtual directory runs.
The following table describes the configuration parameters that are set for the virtual directory, based on the operating system on which the report server is running.
Operating System | Configuration Parameters |
---|---|
Windows 2000 (all versions) |
|
Windows XP (all versions) |
|
Windows Server 2003 |
|
When creating a virtual directory on Microsoft Windows Server 2003:
- At least one application pool must exist.
- If a default application pool exists, it is assigned to the virtual directory at creation time.
- If a default application pool does not exist, the first application pool is assigned to the virtual directory at creation time.
Requirements
Namespace:root\Microsoft\SqlServer\ReportServer\v9\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)
See Also
Reference
MSReportServer_ConfigurationSetting Members
MSReportServer_ConfigurationSettingForSharePoint Members