0
votes

I have a solution on c#. It consists of latest google adwords client library and 3 my projects.

One of these projects uses client library and third project which provides class getting crm sdk IOrganizationService. Second also uses crm connection class and they work properly.

The project using client library worked properly till today but now It can't get IorganizationService from crmconnector class with Exception that xrm sdk can't resolve the url. But with second project everything is OK.

May be there is some conflict of client library and crm sdk. May someone know the issue.

all 3 files use this in using section

using Microsoft.Xrm.Sdk; 
using Microsoft.Crm.Sdk; 
using Microsoft.Crm.Sdk.Messages; 
using Microsoft.Xrm.Client; 
using Microsoft.Xrm.Sdk.Client; 
using Microsoft.Xrm.Sdk.Query; 
using Microsoft.Xrm.Client.Services; 

CrmConnector has credentials as static fields and return IOrganizationService from static method

public class CrmConnector
    {
        private static string _url = "http://crmsrv:5255/TestBaseSNT/XRMServices/2011/Organization.svc"; //it's the internal url
        private static string _login = "hrach";
        private static string _domain = "mscnt";
        private static string _psw = "hgfYTR43@!";




        public static IOrganizationService GetService()
        {
            ClientCredentials Credentials = new ClientCredentials();
            Uri OrganizationUri;

            Credentials.Windows.ClientCredential = new NetworkCredential(_login, _psw, _domain);
            OrganizationUri = new Uri(_url);

            Uri HomeRealmUri = null;
            OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(OrganizationUri, HomeRealmUri, Credentials, null);
            return (IOrganizationService)serviceProxy;

        }

    }

There is an inner exception with message

Value 'type' can't be resolved. unable to load type from "Google.Api.Ads.Common.Lib.SoapListenerExtension" from "Google.Ads.Common". (C:\Users\hrach\Desktop\SntAdwords\Stat\bin\Debug\StatAdwords.vshost.exe.Config line 125)

1
I'd say there's no way to answer this without more details and seeing code ... can you add a minimal reproducible example of how you are connecting to CRM and how you are passing connection info (url) to get the IOrganizationService.Filburt
all 3 files use this in using section using Microsoft.Xrm.Sdk; using Microsoft.Crm.Sdk; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Client; using Microsoft.Xrm.Sdk.Client; using Microsoft.Xrm.Sdk.Query; using Microsoft.Xrm.Client.Services; CrmConnector has credentials as static fields and return IOrganizationService from static method OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(OrganizationUri, HomeRealmUri, Credentials, null); return (IOrganizationService)serviceProxy;deadKenny2
the 2 main console apps set the returmed service to a static field and invoke method from set in Console/ But one that has no connection with adwords client library works properly, and other get exception from crmconnetor "cant't resolve url"deadKenny2
Please edit your post - it's really hard to read code in the comments.Filburt
Not related to your problem, but I'd recommend using Microsoft.Xrm.Tooling.Connector - if you are targeting an on-premise system you can even omit username/password and rely on Integrated Authentication.Filburt

1 Answers

0
votes

I removed system.web section form app.config provided by adwords client library/ This didnt affected on getting reports form google adwords and fixed connecting to crm/