Changes needed to get working

Dec 10, 2013 at 11:54 PM
Edited Dec 11, 2013 at 1:19 AM
I ran into a few problems when trying to get the downloadable version working.
And it would appear that a few people have run into the same issues.

So here are the changes I made to get this to work:

Do a search for
new Uri(registrationCollection.XrmServerDetails.ServerAddress)
and replace all instances with
registrationCollection.XrmServerDetails.ServerAddress

Do a search for
new Uri(ServerAddress)
and replace all instances with
ServerAddress

Do a search for
new Uri(xrmServerDetails.ServerAddress)
and replace all instances with
xrmServerDetails.ServerAddress

Add the following constructors to XrmService.cs
public XrmService(String serverUrl, string organization)
    {
        if (serverUrl != null)
        {
            this.ServerAddress = serverUrl;
            this.OrganizationName = organization;
            this.isSecure = false;
        }
    }
public XrmService(String serverUrl, string organization, string domain, string userName, string password)
    {
        if (serverUrl != null)
        {
            this.ServerAddress = serverUrl;
            this.OrganizationName = organization;
            this.Domain = domain;
            this.UserName = userName;
            this.Password = password;
            this.isSecure = false;

        }
    }
Add the following constructors to XrmMetadata.cs
public XrmMetadata(String domainUri, string organization)
    {
        if (domainUri != null)
        {
            this.ServerAddress = domainUri;
            this.OrganizationName = organization;
        }
    }

In XrmService.cs line 450
replace
ServerConnection
with
serverConnection


Hope this helps others save some time in getting this going.