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/arc...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...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:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Lance Wynn" <La********@community.nospam>
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