I've created a simple custom WCF service in SharePoint.

enter image description here


    using System.ServiceModel;

    namespace TicketingSystem.Core.ClientService
        public interface ITicketingClientService
                string HelloWorld();


<%@ ServiceHost Language="C#" Debug="true"
    Service="TicketingSystem.Core.ClientService.TicketingClientService, TicketingSystem.Core, Version=, Culture=neutral, PublicKeyToken=522e648c9986f590"  
    Microsoft.SharePoint.Client.ServerRuntime, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL %>


using System.ServiceModel.Activation;
using Microsoft.SharePoint.Client.Services;

namespace TicketingSystem.Core.ClientService
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class TicketingClientService : ITicketingClientService
        public string HelloWorld()
            return "Hello World from WCF and SharePoint 2013";


It works: http://sharepointtest/_vti_bin/TicketingClientService/TicketingClientService.svc/mex?wsdl But now I want to connect to it from an AngularJS application, without exposing the rest of SharePoint to the public. Unfortunately, SharePoint is forcing me to authenticate with it via NTLM, unless the whole web application has anonymous access enabled (which I haven't tested yet.).

I get this error:

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

So, is there a way to host a web service within SharePoint to service requests to any user, authenticated or not, without that user having permissions on lists, libraries, etc... within SharePoint?

  • Why not host it in a different web application in IIS which has no relation to SharePoint? – Akhoy Sep 1 '15 at 15:51
  • I was thinking of that but I'd leave it as a plan b.. I'd rather have it in SharePoint, one less project, one less component to worry about – David Sep 1 '15 at 20:14

Your Answer

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

Browse other questions tagged or ask your own question.