Solved

Visual Web part project to Sharepoint 2010 - consume WCF

Posted on 2012-03-29
3
1,007 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.net Markup for Sub Menu 2 65
CSS for Popup in ASP.NET 4 49
Expanding/Collapsing Tree on SharePoint List 29 68
Access-Control-Allow-Origin 4 46
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…

752 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