1
Vote

WCF End Point not working for Project created with SharePoint WCF Service Application

description

Hi,

I have created SharerePoint 2013 WCF Service Application without Database option. Just deployed the solution on Central Adminstration Site. Did the steps as suggested in documentation.

1 Step related with Creation/ Managing Service was missing. Did that by creating a new Service Application via OOB features.

I was accessing this service via URL i.e.

http://SiteName:Port/_vti_bin/ProjectName/HelloWorld.svc

but it did not work.

also accessed the Web Service way i.e.

http://SiteName:Port/WebServices/ProjectName/HelloWorld.svc

but it did not work either.

Suggest how to make the Service Work and also If I need to access this via some Proxy made from SPServiceContext mode.

Please help it is urgent.

With regards

Rajat

file attachments

comments

adamtoth wrote Dec 12, 2013 at 4:57 PM

Hello,

Please see the comments in this issue, as it seems similar to yours:

http://serviceappstarterkit.codeplex.com/workitem/7671

If you are using the WCF + REST template, you can't hit the service endpoint directly, this isn't normal WCF with MEX/WSDL endpoints. You have to use a REST path, similar to the following:

http://servername/_vti_bin/YourServiceName.Client/HelloWorld.svc/HelloWorld/some-string-of-text-here

If you are not using the REST option, then you need to use one of the C# proxy classes in the solution to call methods. You cannot call the SVC in the WebServices folder directly, you have to use the ServiceClient proxy classes in C# code.

adamtoth wrote Dec 12, 2013 at 7:36 PM

To be specific, the HelloWorldServiceClient needs to be instantiated to call into the service methods.