Accessing CRM 4.0 crmservice from MobileClient RRS feed

  • Question


    Hi all,

    I am accessing CRM 4.0 crmservice from a mobile client.

    following is the code

    CrmAuthenticationToken token = new CrmAuthenticationToken();

    token.AuthenticationType = 0; // See Microsoft.Crm.Sdk.AuthenticationType

    token.OrganizationName = orgInfo.OrganizationName;

    CrmService crmService = new CrmService();

    crmService.Url = http://[server]:[port]/MSCrmServices/2007/CrmService.asmx

    crmService.CrmAuthenticationTokenValue = token;

    crmService.Credentials = new System.Net.NetworkCredential("username","password");

    // STEP 4: Invoke a CrmService Web service method.

    WhoAmIRequest whoRequest = new WhoAmIRequest();

    WhoAmIResponse whoResponse = (WhoAmIResponse)crmService.Execute(whoRequest);


    I am getting the SopaException.


    An unexpected error occurred. Error code 0x80040216


    What wrong i am doing here.

    Please suggest me.



    Thursday, May 8, 2008 11:58 AM


  • debug the code and give more details regarding the error.


    Monday, May 12, 2008 2:26 PM