0

I'm trying to deploy a WCF hosted on my SharePoint site but I can't find the address where my web service is deployed.

I have a confirmation message which said that my web service is well deployed but I can't reach it!

So my sharepoint site is: http://Sharepoint/sites/pwa (it's a project site)

My web service is called Service1 and it builds in my namespace: Test.PS2016 I tried a lot of paths but I can't find my web service

It's still doesn't work, now I have a new issue, I saw the site but when I click on it I have an error message

So i have my ASP.NET Web Application which is called: Foo.PS2016.PSIExtension

With its iservice and Service (Very simple one):

Iservice:

namespace Foo.PS2016.PSIExtension
{
    [ServiceContract]
    interface IService
    {
        [OperationContract]
        bool isAlive();
    }
}

Service:

namespace Foo.PS2016.PSIExtension
    {

   [AspNetCompatibilityRequirements(RequirementsMode =     AspNetCompatibilityRequirementsMode.Allowed)]
   internal class Service : IService
  {
    public bool isAlive()
       {
        return (true);
       }
    }
}

its Service.svc:

<%@ ServiceHost Language="C#" Debug="true" Service="Foo.PS2016.PSIExtension.Service" %>

and its webservice:

*<?xml version="1.0" encoding="utf-8"?>
<!--
  -->
<configuration>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
    <httpModules>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
    </httpModules>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>*

and I have my SharePoint solution with its folder ISAPI=>PSI=>Foo.PS2016.PSIExtension.svc :

The Version, culture and PublicKey comes from a powershell command from the file: Foo.PS2016.PSIExtension.dll

So I have been stucking on this issue since this morning so if someone has some ideas to help me

1

The _vti_bin is the built-in SharePoint Web services directory, it's not the default directory for the custom deployed web service.

To can deploy your custom WCF to this directory, you should add ISAPI as a mapped folder in your SharePoint solution

enter image description here

In this case, you can find your WCF below _vti_bin as the following

http://your site collection/_vti_bin/your web service folder/Service1.svc

Note: if you have added the web service under layout folder, so it's path should be this https://Sharepoint/Sites/pwa/_layouts/15/service folder/service1.svc

Alos please check this good reference to be able to Create a Custom WCF REST Service Hosted in SharePoint and Deployed in a WSP

  • Thank for your answer It's weird but my IIS is empty, I don't see any of my Webservice – Cookistador Apr 11 '18 at 14:59
  • How you have deployed your web service, what I know there is publishing profile, to specify the publishing path, please check it's entries! – Mohamed El-Qassas MVP Apr 11 '18 at 15:00
  • I deployed my solution with visual Studio I build a new sharepointempty project and I added a WCF library – Cookistador Apr 11 '18 at 15:01
  • Please check the updated answer , hope it help :) – Mohamed El-Qassas MVP Apr 11 '18 at 15:16
  • Ok, so I have to put my webservice in the same folder than my sharepoint files, because I followed a guide where they put the webservice in a wcf solution – Cookistador Apr 12 '18 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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