RE: Error on SOAP Call on only one machine: Could not find default endpoint element that references contract 'ServiceReference1.SLDSoap' in the ServiceModel client configuration section



Hi Lance,

From your description, you encountered error when try instantiate a certain
webservice client you created in VS 2008 project, correct?

According to the error message and code snippet. It seems you're using a
project targetting .NET 3.5. By default, .NET 3.5/3.0 based project will
only provide "Add Service Reference"(not Add WebReference), and the
"Service Reference" is a proxy class used for consuming WCF service.

#Consuming a WCF service
http://geekswithblogs.net/MainaD/archive/2008/02/04/119287.aspx

Though WCF client can also consume standard XML webservice, you can still
use webservice proxy(web reference) if your server-side service is still an
ASP.NET webservice(rather than WCF service). To generate webservice
proxy(add webReference) in VS 2008, you can refer to the following article:

#How to add web reference in VS 2008 Project
http://carlosfemmer.com/post/2008/01/How-to-add-web-reference-in-VS-2008-Pro
ject.aspx

The error itself indicate the the WCF service client proxy doesn't have a
endpoint configuration in app.config file(by default the IDE should have
generated one endpoint for you). Anyway, you can first try using "Add
WebReference" instead to see whether it helps.

If there is anything unclear, welcoem to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: "Lance Wynn" <Lance_Wynn@xxxxxxxxxxxxxxxx>
Subject: Error on SOAP Call on only one machine: Could not find default
endpoint element that references contract 'ServiceReference1.SLDSoap' in
the ServiceModel client configuration section
Date: Tue, 15 Apr 2008 16:48:44 -0600


Hello,
I am receiving this error when trying to instantiate a webservice
component.
I have 2 development machines, both are XP sp2 with VS 2008 installed. On
one machine, the code works fine. On the other machine I get the error
upon
instantiating the service client. I add the reference by choosing Add
Service Reference from the project menu, and pointing to the remote wsdl
file. I can't seem to find what the difference between the two systems is.

Thanks
Lance

The following is the code

Dim sld As ServiceReference1.SLDClient
sld = New ServiceReference1.SLDClient 'error happens here...

Error:
Could not find default endpoint element that references contract
'ServiceReference1.SLDSoap' in the ServiceModel client configuration
section. This might be because no configuration file was found for your
application, or because no endpoint element matching this contract could
be
found in the client element.


--
Support Fairtax Legislation
www.fairtax.org

"A government big enough to give you everything you want, is strong enough
to take everything you have."
-Thomas Jefferson




.



Relevant Pages

  • Re: Error on SOAP Call on only one machine: Could not find default endpoint element that references
    ... I created the connection as a webservice, and it seems to be working. ... "Service Reference" is a proxy class used for consuming WCF service. ... Microsoft MSDN Online Support Lead ... Could not find default endpoint element that references contract ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VS2008 creates a 2nd endpoint when actualising a web reference
    ... you are developing an WCF service and a client through VS 2008. ... The service used to use wshttpbinding, and when you switch it to netTcpBinding and regenerate the service reference at client, you found the client generate two configuration section for the service endpoint, correct? ... We welcome your comments and suggestions about how we can improve the support we provide to you. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Soap
    ... As for the VB soap client, do you mean it is a webservice proxy generated in the VB.NET application, also is the server-side webservice also based on .net/ASP.NET? ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: vb office automation questions
    ... release instead of needing to go back to the code and add new reference then ... rebuild and new installation to client just for the new office reference? ... for each version you intend to support. ... This reply is posted in the Newsgroup; please post any follow question or reply ...
    (microsoft.public.office.developer.automation)
  • Re: Notifying a user on demand
    ... I'm afraid this is quite difficult as the webservice by default is used as ... the client calls the server for information modal. ... portto let the server-side invoke. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)