CreateVirtualDirectory Method (WMI MSReportManager_ConfigurationSetting Class)
Creates a virtual directory for Report Manager on the computer on which it is installed.
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. 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 website 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.
備註
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 IIS path 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 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
Platform: Windows Server 2003、Datacenter Edition;Windows Server 2003、Enterprise Edition;Windows Server 2003、Standard Edition;Windows Vista;Windows XP Professional Service Pack 2 (SP2) 或 Service Pack 1 (SP1);或 Windows 2000 (所有版本)
請參閱
參考
MSReportManager_ConfigurationSetting Members