By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
Jun 27 '08 #2

P: n/a
Thanks Steven,

I created the connection as a webservice, and it seems to be working. The
odd thing is that on a different machine, creating it as a Service Reference
works fine...
--
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

"Steven Cheng [MSFT]" <st*****@online.microsoft.comwrote in message
news:SZ**************@TK2MSFTNGHUB02.phx.gbl...
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

Jun 27 '08 #3

P: n/a
Thanks for your reply Lance,

Glad that you've got the webreference working.

If you still have interests to figure out the service referenc issue. I
suggest you check the app.config which should contains the configuration of
the WCF service proxy. You can compare the two ones(one on the correct
machine and one on the problem machine) to find the difference.

if there is anything else you want to know, welcome 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.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Lance Wynn" <La********@community.nospam>
References: <u9**************@TK2MSFTNGP02.phx.gbl>
<SZ**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: 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
>Date: Wed, 16 Apr 2008 07:30:03 -0600
>
Thanks Steven,

I created the connection as a webservice, and it seems to be working. The
odd thing is that on a different machine, creating it as a Service
Reference
>works fine...
--
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

"Steven Cheng [MSFT]" <st*****@online.microsoft.comwrote in message
news:SZ**************@TK2MSFTNGHUB02.phx.gbl...
>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


Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.