Manager. Get Object Factory(String, Boolean) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an object factory for the specified virtual path.
public: static System::Web::Util::IWebObjectFactory ^ GetObjectFactory(System::String ^ virtualPath, bool throwIfNotFound);
public static System.Web.Util.IWebObjectFactory GetObjectFactory (string virtualPath, bool throwIfNotFound);
static member GetObjectFactory : string * bool -> System.Web.Util.IWebObjectFactory
Public Shared Function GetObjectFactory (virtualPath As String, throwIfNotFound As Boolean) As IWebObjectFactory
The virtual path.
true to throw an error if the virtual path does not exist; otherwise,
false. If the virtual path does not exist and
false, this method returns
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.
This method returns an object that enables you to generate a type by compiling the virtual path. It returns an object regardless of whether the Web site is precompiled.