Configuration Information for Plugin

Instead of creating a separate .config file for saving configuration info, now we can specify the configuration information for a plugin while we are registering it.

We just need to create a constructer for the plugin class

public class SharingEntity : IPlugin
{

string lscTempId = “”;
string lsuTempId = “”;

public SharingEntity(string unsecureConfiguration, string secureConfiguration)
{
XmlDataDocument doc = new XmlDataDocument();
doc.LoadXml(secureConfiguration);

lscTempId = doc.SelectSingleNode(“//LeadSharingCreate”).InnerText;
lsuTempId = doc.SelectSingleNode(“//LeadSharingUpdate”).InnerText;

………………….

The config info is specified as following
<Config>
<LeadSharingCreate>8a08c5ec-b6cd-dd11-a48d-00164145e126</LeadSharingCreate>
<LeadSharingUpdate>88E6872C-B7CD-DD11-A48D-00164145E126</LeadSharingUpdate>
</Config>

We have put the above info in the Secure Configuration area of the plugin registration dialog box, while registering the Step.

“The unsecureConfiguration is made available to plug-ins invoked both on the server and in the outlook client.The secureConfiguration is more secure and is only passed to the plug-in when it executes on the server. The secure configuration allows you to keep the information from being distributed to client machines that might be less secure.”


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s