wwAppConfiguration.WriteKeysToConfig

Writes all of the configuration file properties to a specified configuration file.

The format written is in standard .Config file format, but this method allows writing out to a custom .Config file.

public Boolean WriteKeysToConfig(String Filename)

Return Value

true or false

Parameters

String Filename
Name of the file to write out

Remarks

Application must have rights to write to this file. For ASP.Net this especially important as ASPNET/NETWORK USER generally doesn't have access to this file. If you want updateability make sure that these accounts have read/write access. Full access if the file doesn't already exist.

Example

// *** Overridden constructor 
public WebStoreConfig() :
{
   this.SetEnryption("ConnectionString,MailPassword,
                     MerchantPassword","WebStorePassword");

   // *** Use a custom Config file
   this.ReadKeysFromConfig(@"d:\projects\wwWebStore\MyConfig.config");
}

... later in your code

App.Configuration.WriteKeysToConfig(@"d:\projects\wwWebStore\MyConfig.config");

Overloads:


See also:

Class wwAppConfiguration

© West Wind Technologies, 1996-2018 • Updated: 04/21/04
Comment or report problem with topic