Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IFtpLogProvider.Initialize Method [IIS 7]
Collapse the table of content
Expand the table of content

IFtpLogProvider.Initialize Method [IIS 7]

IIS 7.0

Initializes a new instance of the IFtpLogProvider interface.

protected override void Initialize(
   StringDictionary config


[IN] A StringDictionary that contains key/value pairs from the IIS configuration settings.

You can specify parameters for an FTP provider in the IIS applicationHost.config file by adding an <activation> collection, which may contain a series of <providerData> elements that list additional settings for custom FTP providers. Each <providerData> element is paired with an entry in the <providerDefinitions> collection, and contains a series of key/value pairs that contain information that is specific to each provider. By overriding the Initialize method, your module can retrieve the series of key/value pairs from the configuration store.

The following configuration excerpt illustrates a custom FTP provider entry in the applicationHost.config file and its related information.

      <add name="FtpDemo"
         type="FtpDemo.DemoProvider,FtpDemo,version=,Culture=neutral,PublicKeyToken=f0e1d2c3b4a59687" />
         <providerData name="FtpDemo">
            <add key="one" value="1" />
            <add key="two" value="2" />

The following code example iterates through the array of configuration settings and sends the key/value pairs to the debug stream.

protected override void Initialize(StringDictionary config)
   // List the number of configuration entries for this provider.
   Debug.WriteLine("Config Entries: " + config.Count);
   if (config.Count > 0)
      // Enumerate the individual configuration entries.
      foreach (DictionaryEntry entry in config)
         // List the key name and value for each configuration entry.
         Debug.WriteLine(entry.Key + ": " + entry.Value);




IIS 7.5


IIS 7.5


FTP 7.5



Community Additions

© 2015 Microsoft