Things to do to the CRM RSS connector

There are two things that need to get done with the RSS connector, and soon. First, I keep seeing these issues with the connector's default server location. I keep forgetting that CRM has to install itself at a non-standard port (5555) when on SBS. That means that the default to 'localhost' in the service and metadata proxies isn't going to work.

 

Here's my recommendation, which I'll try to get into an updated RSS package sometime soon. First, edit the web.config file and add a new key to the appSettings

 

<appSettings>

   <add key="CRMServerLocation" value="servername:portnumber" />

</appSettings>

 

Then, modify the constructors for CrmService and MetadataService to use the configuration setting instead of the hard-coded value.

 

public CrmService() {

string server = System.Configuration.ConfigurationSettings.AppSettings["CRMServerLocation"];

 

if (server == null || server == "")

server = "localhost";

 

this.Url = "https://" + server + "/mscrmservices/2006/crmservice.asmx";

}

 

public MetadataService() {

string server = System.Configuration.ConfigurationSettings.AppSettings["CRMServerLocation"];

 

if (server == null || server == "")

server = "localhost";

 

this.Url = "https://" + server + "/mscrmservices/2006/metadataservice.asmx";

}

 

The next thing that needs to happen, but isn't as critical yet, is to change the way the feed list is loaded. Currently, the generator loops over all the configured entities and for each one asks the platform for all configured and available queries. That's brutal, but on fast hardware it doesn't seem to be a problem (it still is though).

 

The solution here is to run a single query, once, over all queries and parse the results into a list by entity. This will seriously cut down the database hit and cross-network traffic. I was working on this just before we released the code, but I didn't have it coded in a way that was understandable.

 

If anyone makes this change, post the code somewhere or mail it to me. I'll do what I can to get the changes into the next connector update.