This documentation is archived and is not being maintained.
BuildManager::GetObjectFactory Method
Visual Studio 2010
Gets an object factory for the specified virtual path.
Assembly: System.Web (in System.Web.dll)
public: static IWebObjectFactory^ GetObjectFactory( String^ virtualPath, bool throwIfNotFound )
Parameters
- virtualPath
- Type: System::String
The virtual path.
- throwIfNotFound
- Type: System::Boolean
true to throw an error if the virtual path does not exist; otherwise, false. If the virtual path does not exist and throwIfNotFound is false, this method returns nullptr.
| Exception | Condition |
|---|---|
| HttpException | The virtual path does not exist. -or- A higher-level exception already existed when this method was called. -or- This method was called while the compilation process was building top-level files. -or- This is a precompiled application and the virtual path was not found in the cache. -or- A circular reference was detected. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: