Solved

Visual Web part project to Sharepoint 2010 - consume WCF

Posted on 2012-03-29
3
986 Views
Last Modified: 2012-03-30
I have a page which created using Visual Web Part (for Sharepoint 2010) and later on I am adding to my Sharepoint site.  I have a WCF service(very basic) hosted in IIS 7 (same server). When I deployed my page which created in Visual Web Part project, I kept getting the error below.
"Could not find endpont element with the name 'BasicHttpBinding_IService1 and the contract 'ServiceReference.IService1.....etc". What should I do from here on?


(i can consume WCF service from my asp.net page from a different server box perfectly fine.)
0
Comment
Question by:VBdotnet2005
  • 2
3 Comments
 

Author Comment

by:VBdotnet2005
ID: 37782747
This is exactly  I having a problem with. How can I modify web config file in Sharepoint 2010? Or what should I do?
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/dea0763d-d6ea-4659-8ef0-8275514d066a/
0
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 total points
ID: 37785743
This error can arise if you are calling the service in a class library and calling the class library from another project


Reference:

http://forums.asp.net/t/1716855.aspx/1
http://www.dotnetspark.com/links/16538-endpointnotfoundexception---no-endpoint.aspx
0
 

Author Comment

by:VBdotnet2005
ID: 37788756
http://stackoverflow.com/questions/352654/could-not-find-default-endpoint-element
"I had the same problem, but changing the contract namespace didn't work for me. So I tried a .Net 2 style web reference instead of a .Net 3.5 service reference. That worked.

To use a Web reference in Visual Studio 2008, click on 'Add Service Reference', then click 'Advanced' when the dialog box appears. In that you will find an option that will let you use a Web reference instead of a Service reference."

I did as suggested. It works !!!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now