Today I developed an application to be deployed in ISV. However as per request I couldn’t use the default organization,
so I need to change the url from:
The problem is my current web.config couldn’t be loaded properly. I got empty configuration even I use existing configuration from other project that use the same CRM.
After a chat with my work mate, he come accoss to Janne Mattila’s blog and I found the solution.
That’s a relief, yet not the end of the problem. I have a project that contains all CRM functions there. The solution above only applicable if I use those functions in one project, unfortunately I use it accross several projects.
So after some time and a chat with my work mate again we come into a solution:
1. I create a function in the config class that I use for the projects
public static void LoadCustomConfigFile()
// open the configuration on this specific path
Configuration configuration = WebConfigurationManager.OpenWebConfiguration("/ISV/");
// get all configuration that starts with "Crm" keyword - use "Crm" keyword for Crm related settings
var crmConfigurationKeys = configuration.AppSettings.Settings.AllKeys.Where(k => k.StartsWith("Crm")).ToList();
foreach (var crmKey in crmConfigurationKeys)
2. On page load event in the ISV application
protected void Page_Load(object sender, EventArgs e)
// Load custom config
// do the rest of page load event