This project is read-only.
1

Closed

Issue accessing Hello World WCF

description

I have installed and configured the Service application in a sample project, and when i deploy the WCF Client , I am not able to access the wcf endpoint, here is the url i'm using:

http://mySharePointSite/_vti_bin/myService/MyService.svc

This is what i am getting: Endpoint not found

I didn't change any configuration, just standard deployment for both wsps and i'm getting this error.

any help is appreciated.

Thanks.

file attachments

Closed Dec 12, 2013 at 5:58 PM by adamtoth
REST endpoint works as designed.

comments

adamtoth wrote Nov 18, 2013 at 9:45 PM

Per the naming in the solution, I would expect your url to be similar to the following:

http://servername/_vti_bin/YourServiceName.Client/HelloWorld.svc

In the client project, you'll see ISAPI/YourServiceName.Client folder. You should see this folder deployed to the ISAPI folder on the SharePoint hive. Make sure this folder exists, and make sure the svc file with the correct name exists inside this folder.

Verify it is working with the HelloWorld.svc service first, before you create your own service files and folders.

marafacs wrote Nov 18, 2013 at 9:59 PM

Actually, the wsp for the client is deployed, and i see the svc in the ISAPI folder and the correct name is deployed there.

If i added a simple WCF in the Client project it works and i am able to access it, but the HelloWorld.svc i can't access it. The only difference i see is that mine is a standard wcf but yours is REST WCF.

I created more than a service in the client project and i was able to access it, i think there is something is missing on the HelloWorld.svc in the client project. even i tried to define an end point and it didn't work.

any ideas ?

marafacs wrote Nov 18, 2013 at 10:04 PM

If i commented the code in the HelloWorld.svc that uses the server component, it should be a standard WCF. So even if i commented the server code in the HelloWorld.svc this should be accessible.

It would be great if you can post a working sample / template with SharePoint 2013.

Thanks.

adamtoth wrote Nov 18, 2013 at 10:08 PM

Yes, the HelloWorld.svc example is a REST-based service. As such, it does not have a MEX endpoint with a nice WSDL-like description when you hit the svc file directly. Instead, you have to specify the full path to the REST endpoints that are defined in the service. For example, for the HelloWorld.svc example, there are two methods, HelloWorld(string), and HelloWorldFromDatabase(string) (if you used the template that included a custom database). So your url would be like so:

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

marafacs wrote Nov 19, 2013 at 4:40 PM

Thanks, it works as you mentioned in the above reply.

Thanks a lot and great work. appreciate your help in here and in Twitter.

wrote Dec 12, 2013 at 5:58 PM