Posted 6/13/2007 11:07:23 AM | | | | I know that each page instance has CrmService and MetadataService but I want to use them independantly in a class but using c360.config settings. Is there a way to get these or the urls and credentials globally? I see c360.Toolkit.Util class has some ways to retrieve the necessary settings but I don't see all. Util.GetCrmServicesUrl() Util.GetCrmServicesUrl(string webServiceName) Util.GetWebConfigSetting(string strWebConfigKeyName) I could also extract them and save it on the first page hit (any page) but I'm looking for another method. |
| Posted 6/15/2007 3:48:35 PM | | | jihohan (6/13/2007)
I know that each page instance has CrmService and MetadataService but I want to use them independantly in a class but using c360.config settings. Is there a way to get these or the urls and credentials globally? I see c360.Toolkit.Util class has some ways to retrieve the necessary settings but I don't see all. Util.GetCrmServicesUrl() Util.GetCrmServicesUrl(string webServiceName) Util.GetWebConfigSetting(string strWebConfigKeyName) I could also extract them and save it on the first page hit (any page) but I'm looking for another method. There is a way but please note that it isn't supported. The reason why it's not supported is because if you use this technique in your class outside of a web application with the expected folder structure, this method may not work, it may or may not be able to find the expected configuration files and therfore we are not supporting this scenario. Now that the disclaimer is out of the way , here's how you can do it: ICrmService crmService = CrmServiceFactory.CreateCrmService();IMetadataService metadataService = MetadataServiceFactory.CreateMetadataService();
|
| |
|