Creating Custom WCF in sharePoint 2013 RRS feed

  • Question

  • Hello,

    •  I read the following article to create Custom wcf "".
    • I have followed the steps .
    • when I open the .svc  from browser I got the following error :

               "sharepoint  provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found."

    How Can I solve it?


    • Edited by himo Thursday, June 19, 2014 9:50 AM
    Thursday, June 19, 2014 9:46 AM



    Turns out the Eval.svc.cs needed its namespace changing to EvalServiceLibary, rather than EvalServiceSite.

     found the solution, just change the endpoint address and added the baseAddress working fine
    here is my web.config file

    <customerrors mode="Off" />
    <compilation debug="true" targetframework="4.0">
    <servicehostingenvironment aspnetcompatibilityenabled="True" multiplesitebindingsenabled="True">
    <service name="abc.MyService" behaviorconfiguration="MyWCF">
    <endpoint address="http://YourSiteName/MyService.svc" listenuri="/" binding="wsHttpBinding" contract="abc.IMService"></endpoint>

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <add baseaddress="http://YourSiteName/" /> </baseAddresses>
    <behavior name="MyWCF">

    <servicemetadata httpgetenabled="true" policyversion="Policy15" />
    <servicedebug includeexceptiondetailinfaults="true" />
    <modules runallmanagedmodulesforallrequests="true">

    If this helped you resolve your issue, please mark it Answered

    • Marked as answer by JasonGuo Sunday, June 29, 2014 8:52 AM
    Thursday, June 19, 2014 10:33 AM