Solved

Visual Web part project to Sharepoint 2010 - consume WCF

Posted on 2012-03-29
3
997 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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