Solved

Visual Web part project to Sharepoint 2010 - consume WCF

Posted on 2012-03-29
3
1,000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
New User access denied in sharepoint 2010 3 57
Problem to copy file 14 50
Sharepoint 2016 LDAP connection 22 27
Broken .resx file generating errors 18 17
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

749 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