PFN_WEB_CORE_ACTIVATE Function

IIS 7.0
 

Starts an instance of the Hosted Web Core.

typedef HRESULT (*PFN_WEB_CORE_ACTIVATE)(  
   IN PCWSTR pszAppHostConfigFile,  
   IN PCWSTR pszRootWebConfigFile,  
   IN PCWSTR pszInstanceName  
);  

Parameters

pszAppHostConfigFile
A pointer to a string that contains the path of a configuration file.

pszRootWebConfigFile
A pointer to a string that contains the path of a root Web.config file. (Optional)

pszInstanceName
A pointer to a string that contains the name of the instance that will be used for event logging.

An HRESULT. Possible values include, but are not limited to, those in the following table.

ValueDescription
S_OKIndicates that the operation was successful.
ERROR_SERVICE_ALREADY_RUNNINGIndicates that an instance of the Hosted Web Core is already running in the process.
ERROR_INVALID_DATAIndicates that a configuration error occurred in the configuration file.
System_CAPS_ICON_note.jpg Note

If the PFN_WEB_CORE_ACTIVATE function returns an ERROR_INVALID_DATA message, the Event Viewer may contain additional details regarding the cause of the failure.

The PFN_WEB_CORE_ACTIVATE function is a prototype for the WebCoreActivate DLL entry point in Hwebcore.dll that is used to start the Hosted Web Core. The process that hosts the Web core is required to provide the path of a configuration file that contains the configuration settings for any sites, the application pool, and so on, that are to be created.

System_CAPS_ICON_note.jpg Note

The Hosted Web Core requires a configuration file that follows the design of the ApplicationHost.config file, except that Hosted Web Core supports only one application pool. For more information about how to create a configuration file for your application, see Walkthrough: Creating a Configuration File for Hosted Web Core.

This function also requires the name of the instance of the Hosted Web Core that IIS 7 uses when it logs events to the Event Viewer. The hosting process may optionally provide the path of a root Web.config file that contains any additional parameters.

TypeDescription
Client- IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server- IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016 Technical Preview
Product- IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
- IIS Express 7.5, IIS Express 8.0, IIS Express 10.0
HeaderHwebcore.h

Hosted Web Core API Reference
PFN_WEB_CORE_SHUTDOWN Function

Show: