Hi,
In callouts in CRM 3.0, for providing configuration information we used to create our own config file.
The naming convention that we used to follow was
AssemblyName.dll.Config
And we used to deploy it at the same location as callout i.e. server/bin/assembly
The structure of the config file used to be
<?xml version=”1.0″ encoding=”utf-8″ ?>
<config>
<crmurl>http://servername:5555/mscrmservices/2006/crmservice.asmx</crmurl>
<loglocation>C:\CrmLog\PluginLog.txt</loglocation>
</config>
To read the config values in the callout we used to have this following code
string assemblyLocation=System.Reflection.Assembly.GetExecutingAssembly().Location;
string crmUrl=GetConfigValue(assemblyLocation,”crmurl”);
The GetConfigValue function
private static string GetConfigValue(string AssemblyName,string KeyValue)
{
string Filename=AssemblyName+”.config”;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Filename);
XmlNode crmNode = xmlDoc.SelectSingleNode(“//”+KeyValue);
string tagValue=crmNode.InnerText.ToString();
return tagValue;
}
Actually I was working with callouts after so many months, so thought i should save the above information for future reference!!
Bye…