web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Could not find default endpoint element that references contract

(0) ShareShare
ReportReport
Posted on by 1,606

Hi,

            I am was able to create a Service Group and Service and deployed it. The purpose of the service is enable my web application to create sales order on MS AX.  I created a console application to get the service i created and get the console application as reference to my web application.

When ever I create the Sales Order through the Web Application, this error occurs:

"Could not find default endpoint element that references contract 'SalesOrderService.SalesOrderIntegrationService' in the Service Model Client configuration section. This might be because no configuration file was found for your application, or because no end point element matching this contract could be found in the element client"

I read some threads, i do I need to modify my web.config? 

Thanks in advance! :)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    blue_dreamer61@yahoo.com Profile Picture
    1,606 on at
    RE: Could not find default endpoint element that references contract

    Hi,

    I was able to solve this by using the Wizard in creating the Service. I think what I did wrong was I created the service and service group manually (not using the Wizard which created the classes needed). I was also able to reference the Service directly to the Website Project. This also solved my problem: "Could not find default endpoint element" because it generated the correct end point script on the Web.config.

          Thanks for the ideas!! Thanks!!!

  • Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: Could not find default endpoint element that references contract

    Aha, so you have created a web site, not a web application. If you're at the beginning of your development, consider switching to the web application project.

    You named your reference ServiceReference1, therefore you'll find generated types in ServiceReference1 namespace. That you named the reference SalesIrderImportService is another application is irrelevant, if you want to use your new reference.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Could not find default endpoint element that references contract

    Please follow following link for more details

    msdn.microsoft.com/.../cc652581(v=ax.50).aspx

    Hope this helps you.

  • blue_dreamer61@yahoo.com Profile Picture
    1,606 on at
    RE: Could not find default endpoint element that references contract

    Hi Martin,

    Yes i tried to do the same calling the service in my Web Application but when I add the Service to the Web Application, it goes to the App_WebReferences folder. Is it correct?

    I use "using salesOrderImport = FocusOnlineServiceClassLibrary.SalesOrderImportService;" to call the Service in the Console Application. i tried using this code and other alternatives to call the Service but it does not work. I am really new to this but I'm eager to finish. Please help. Thanks for the feedbacks!!

  • Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: Could not find default endpoint element that references contract

    You said you already know how to call the web service from a console application. Why can't you do the same in a web application?

  • blue_dreamer61@yahoo.com Profile Picture
    1,606 on at
    RE: Could not find default endpoint element that references contract

    Hi MARTIN,

    I really wanted to add the service reference directly to the web application. but I dont know how to declare or to call the service. unlike in the console application. Im interested how to do it and I really think it will be a great idea.Any links that i can read on? thanks!

  • Suggested answer
    Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: Could not find default endpoint element that references contract

    Referring to types defined in your console application doesn't load the app.config of the console application. What is used is the configuration of your web application defined in web.config. You have to configure the service client there.

    Either copy the configuration from app.config of the console application, or forget about the console application completely and add the service reference directly to your web application.

  • blue_dreamer61@yahoo.com Profile Picture
    1,606 on at
    RE: Could not find default endpoint element that references contract

    Hi NITESH, How can i re-reference my web service?  Thanks!

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Could not find default endpoint element that references contract

    Yes you need to modify your Web.config file of the web application with appropriate URI of your web service

    may you can re-reference you web service will also update the web.config

    Please verify and update with your fidnings

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans