Gets an object factory for the specified virtual path.
Assembly: System.Web (in System.Web.dll)
public static IWebObjectFactory GetObjectFactory( string virtualPath, bool throwIfNotFound )
- Type: System.String
The virtual path.
- 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 null.
Return ValueType: System.Web.Util.IWebObjectFactory
The object factory.
The virtual path does not exist.
A higher-level exception already existed when this method was called.
This method was called while the compilation process was building top-level files.
This is a precompiled application and the virtual path was not found in the cache.
A circular reference was detected.