Solved

Visual Web part project to Sharepoint 2010 - consume WCF

Posted on 2012-03-29
3
979 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

10 Experts available now in Live!

Get 1:1 Help Now