locked
WCF Data Service in SharePoint 2010 RRS feed

  • Question

  •     I want to take a WCF Data Service pointing to a custom application that I have in a Stand Alone Web Application.  what I want to do now is to create that same WCF Data Service but have it run under SharePoint 2010.  I have created an Entity Framework in an Empty SharePoint project and then created the .svc file under the ISAPI directory in the SharePoint project.

        When I deploy this SharePoint project and try to pull up the service I get the following error from SharePoint
    The type 'xxxx.xxxxx', provided as the Service attribute value in the ServiceHost directive could not be found.

        I have checked and it looks like things are deployed correctly.  The svc file is located in the 14 hive under the isapi directory and the dll for the project is registered in the GAC.

        So what other things do I need to do to make a WCF Data Service work in SharePoint.  I have created regular WCF Services and put them under SharePoint without any problem, so it is just the WCF Data Service that is causing the problem

    Wednesday, January 25, 2012 5:35 PM

Answers

  • No that is about using the built-in SharePoint WCF Data Services.  I'm making a new service against my own data, not against SharePoint.

     

    I have figured out what the problem was though.  The change that I needed to make was to change the SharePoint Web.Config and add the DLL that I was building to the <compile> section of the file.  After I did that it was able to work just fine.

    • Marked as answer by Paul Cavacas Thursday, January 26, 2012 1:15 PM
    Thursday, January 26, 2012 1:15 PM

All replies

  • Thursday, January 26, 2012 2:35 AM
  • No that is about using the built-in SharePoint WCF Data Services.  I'm making a new service against my own data, not against SharePoint.

     

    I have figured out what the problem was though.  The change that I needed to make was to change the SharePoint Web.Config and add the DLL that I was building to the <compile> section of the file.  After I did that it was able to work just fine.

    • Marked as answer by Paul Cavacas Thursday, January 26, 2012 1:15 PM
    Thursday, January 26, 2012 1:15 PM