Error while conneting to CRM 2011 on-premise from worker role of azure.

Unanswered Error while conneting to CRM 2011 on-premise from worker role of azure.

  • Tuesday, May 22, 2012 11:08 AM
     
     

    Hi,

    I have developed one web application using .Net 4.0. Now i want to host that application on windows  azure. when i have write the code for establishing the connection with CRM 2011 online in worker role then it works fine and i am able to establish the connection successfully. But when i try to connect to the CRM 2011 on-premise server from my worker role it throws an error while establishing the connection . For this,I am using service reference of CRM 2011 on-premise into my application. Please help me where i am making the mistake? is there any other option to consume the service and establish the connection? please help me

All Replies

  • Tuesday, May 22, 2012 7:45 PM
     
     

    I have no experience whatsoever with CRM 2011, but are you sure this is not a security issue? Are you sure there are appropriate firewall rules for allowing connections to your on-premise server?


    Be nice to nerds ... Chances are you'll end up working for one!

  • Wednesday, May 23, 2012 7:54 AM
     
     
    yes i am able to coonect to crm from browser,web application but not from windows azure worker role please help?
  • Thursday, May 24, 2012 2:35 AM
    Moderator
     
     

    Can you provide more details info about the exception? Or provide a test application (include code) for testing?

    See this tutorial for more details about CRM and Windows Azure

    Thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Monday, June 04, 2012 4:44 PM
     
     

    When i connect from worker role it is throwing an error that "Metadata contains a refrence that can not be resolved"

    Please Help

  • Tuesday, June 05, 2012 3:36 AM
    Moderator
     
     
    Check here to see if helps: http://www.codewrecks.com/blog/index.php/2011/07/04/troubleshooting-microsoft-dynamic-crm-2011-connection-with-outlook/

    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Tuesday, June 05, 2012 8:43 AM
     
     

    hi arwind i can able to connect crm 2011 on premise from web role (even in normal website ) but when i try to connec  crm 2011 on premise from worker role of azure it s giving me error so please tell me is anything i m missing???

    Thanks in Advance

  • Tuesday, June 05, 2012 9:52 AM
    Moderator
     
     

    Hi,

    "Can you provide more details info about the exception? Or provide a test application (include code) for testing?"

    As i was posted above, because i can not get more details about your exception (errors logs, stack message), or a simple test application from you, so i can hardly say which step you miss or where the error happens, i know you've get the "Metadata contains a refrence that can not be resolved" in Worker role applicaiton already.

    Thanks for understanding.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Tuesday, June 05, 2012 10:16 AM
     
     

    i have added a reference in worker role - 3 dlls of   CRM 2011 SDK (CRM.sdk,crm.sdk.proxy,xrm.sdk)

    public override void Run()
    {

     while (true)
                {
                   // Thread.Sleep(10000);
                    Trace.WriteLine("Working", "Information");

            OrganizationServiceProxy crmSDKObject;
            Uri organizationUri = new Uri("http://crmservername/orgname/XRMServices/2011/Organization.svc");
            Uri homeRealmUri = null;
            System.ServiceModel.Description.ClientCredentials credentials = new System.ServiceModel.Description.ClientCredentials();
            credentials.Windows.ClientCredential = new System.Net.NetworkCredential("username", "password", "domainname");
            crmSDKObject = new OrganizationServiceProxy(organizationUri, homeRealmUri, credentials, null);
             }
    }

    simply written this code & it is showing me error "Metadata contains a refrence that can not be resolved"


    • Edited by krunal89 Tuesday, June 05, 2012 10:17 AM
    •  
  • Tuesday, June 05, 2012 11:41 AM
     
     
    Hi Arwind Please help this is my code
  • Wednesday, June 06, 2012 1:51 AM
    Moderator
     
     

    Hi,

    I use your code at my side (both in WebRole and WorkRole) and get the same exception, but i find inner exception is "The remote name could not be resolved: 'crmservername'", could you make sure the service url is correct and client credential is OK? 

    BR,

    Arwind


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Wednesday, June 06, 2012 8:31 AM
     
     

    thanks for your reply

    i am using my on premise crm so you could use your crm on- premise url & your credential