Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 957199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:39:49+00:00 2026-05-16T00:39:49+00:00

When I try to develop CRM stuff, using the code below: public static CrmService

  • 0

When I try to develop CRM stuff, using the code below:

 public static  CrmService GetCrmService()
        {
           //Standard CRM setup

            var authenticationToken = new CrmAuthenticationToken();
            //Using the active directory
            authenticationToken.AuthenticationType = 0;
            authenticationToken.OrganizationName = "myorganizationName";

            var crmService = new CrmService();
            crmService.PreAuthenticate = true;
            crmService.UseDefaultCredentials = false;
            crmService.CrmAuthenticationTokenValue = authenticationToken;

            crmService.Credentials = new NetworkCredential("username", "password", "domain");
            crmService.Url = "http://<ourserver>/mscrmservices/2007/CrmServiceWsdl.aspx";

            return crmService;
        }

        public void RetrieveAccount()
        {

            var accountGuid = new Guid("088FFC38-8285-4AF5-8E36-84BAD6B268ED");
            var crmService = GetCrmService();

            //Set the column to return

            var returnedColumns = new ColumnSet();

            returnedColumns.Attributes = new string[] { "name", "telephone1", "customertypecode" };

            try
            {
                var receivedAccount = crmService.Retrieve(EntityName.account.ToString(), accountGuid, returnedColumns) as account;
                if (receivedAccount != null)
                {
                    Debug.WriteLine(string.Format("Name: {0}, Telephone: {1}", receivedAccount.name, receivedAccount.telephone1));
                }

            }
            catch (Exception exception)
            {

                Debug.WriteLine(exception.Message);
            }


        }

It comes up with the following exception:

“Possible SOAP version mismatch:
Envelope namespace
http://schemas.xmlsoap.org/wsdl/ was
unexpected. Expecting
http://schemas.xmlsoap.org/soap/envelope/.”

Is there any solution for this problem ?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:39:50+00:00Added an answer on May 16, 2026 at 12:39 am

    After spending several hours, I have figured out that the problem was occured because of using the wrong service address. Instead of connecting to the actual address, I have connected to a redirected address.

    So in the above code, I used the redirected address:

    https://servername/MSCrmServices/2007/CrmServiceWsdl.aspx

    I should have been used the following address:

    https://servername/mscrmservices/2007/crmservice.asmx

    Cheers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]
Try this piece of code - public class WhitespaceTest { public static void main(String[]
I am try to Develop a application that can control a PC using SMS
I am using WSPBuilder to develop Sharepoint2007 sites, whenever i try to debug using
I try to develop custom InDesign plugin using Adobe SDK. Everything was fine until
I try to develop a simple webapp using GWT + hibernate4 + Apache Tomcat.
i develop extension for Chrome using XPCOM and i try communicate my dll with
I am try to develop a status box using jquery, so I have a
I try to install PyQt to develop Python apps using Qt. I downloaded SIP
We are using Magento ver1.6.1 to develop a website. When try upload images for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.