Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am converting a feature from SharePoint 2010 to SharePoint 2013. Part of my project is to convert my feature from the old style manifest, ddf, makecab method to the newer Visual Studio SharePoint project with mapped folders. In our old implementation, we hosted all of our files in 14/TEMPLATE/FEATURES/PROJ and made virtual directories in IIS through code to access our WCF services. I'm now trying to eliminate our need for IIS virtual folders by deploying our WCF to 15/ISAPI/PROJ.

When I add myservice.svc to 15/ISAPI/PROJ, and try to access it from http://myserver/_vti_bin/PROJ/myservice.svc, I get redirected to /_layouts/15/AccessDenied.aspx. I thought that maybe my problem was that I need to add a web.config to ISAPI/PROJ (we never needed one with the IIS virtual directory, so I never thought to add it here). When I add the web.config and debug the Silverlight code that calls the service, I get a Not Found error on the async _completed call.

My SVC file looks like this:

<%@ ServiceHost Language="C#" Debug="true" Service="Project.WCF.WCFServices.WorkFlowData" CodeBehind="WorkFlowData.svc.cs" %>

What can I do to get this to work?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I think you might need to use the SharePoint provided ServiceHostFactory to create the appropriate endpoints for your service.

Look at this tutorial for the Service Host Factories available: http://answers.oreilly.com/topic/1404-how-to-customize-wcf-services-in-sharepoint-2010/

  • SOAP = MultipleBaseAddressBasicHttpBindingServiceHostFactory

  • REST = MultipleBaseAddressWebServiceHostFactory

  • Data Service = MultipleBaseAddressDataServiceHostFactory

share|improve this answer
    
we're currently creating endpoints dynamically in Silverlight, but I will take a look at this. –  Dana Apr 25 '13 at 20:24
    
When I use a factory, I get Endpoint not found. –  Dana Apr 29 '13 at 19:30
    
The link is broken :( –  Anatoly Mironov Nov 27 '13 at 9:02
    
Thanks, updated. –  James Love Nov 27 '13 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.