Share via


Restarting Services After Configuration Changes

Configuration changes are applied only after the new settings are written to persistent storage and reloaded to the services that use them. Most changes can be applied dynamically without restarting any services. However, some configuration changes that you make require restarting the Microsoft Firewall service.

The following actions require restarting the Firewall service:

  • Adding, removing, enabling, or disabling an application filter.
  • Enabling or disabling IP routing.
  • Increasing or decreasing the percentage of physical memory used for caching.
  • Reducing or increasing cache size.
  • Modifying low-level settings.
  • Modifying a tunnel port range.
  • Adding or removing a tunnel port range.
  • Modifying the settings for the Forefront TMG Web proxy.
  • Enabling and disabling Network Load Balancing (NLB) integration in an array (available only in Forefront TMG Enterprise Edition).

The Save, Import, and ImportFromFile methods recursively write all of the properties of an object and its subobjects to persistent storage. For a collection, these methods also write all of its elements and their properties to persistent storage.

The Save, Import, and ImportFromFile methods use the fResetRequiredServices parameter to indicate whether the Firewall service will be restarted if it needs to be restarted for any of the changes saved or imported to take effect. They also have the fReloadConfiguration parameter, is provided only for compatibility with ISA Server and is ignored in Forefront TMG.

If the configuration settings being used by the Forefront TMG services are not updated when new values are written to persistent storage, the configuration settings used by each service will not be updated until the service is restarted or the new settings are reloaded by another call to the Save, Import, or ImportFromFile method.

We recommend making multiple configuration changes and then applying all the changes in a single call to the Save method on an object that contains all the other objects with configuration changes as subobjects. All the unsaved changes can be applied with restarting the required services by using either of the following techniques:

  • Calling the Save method with the fResetRequiredServices parameter set to True (VARIANT_TRUE in C++) on an object that contains all the other objects with configuration changes as subobjects.
  • Calling the Save method with fResetRequiredServices set to False (VARIANT_FALSE in C++) on an object that contains the objects with configuration changes as subobjects and then calling the RestartServices method on the FPCArray object (IFPCArray interface in C++) with the applicable bitmask. Alternatively, services can be stopped and started through Forefront TMG Management, as described in the Forefront TMG product documentation.

Before calling the Save method, you can use the GetServiceRestartMask method to ascertain which services need to be restarted to apply the unsaved changes. This method retrieves a bitmask that specifies which services need to be restarted for any of the currently unsaved changes in the object on which it was called and all of its subobjects to take effect. Then you can apply the unsaved changes using the techniques described in the previous list.

Send comments about this topic to Microsoft

Build date: 6/30/2010