1

Hell guys,

I have a WCF service deployed to SharePoint site exactly like in this tutorial - there is a .svc file deployed to ISAP folder (/_vti_bin virtual directory) and there is a class implementing service interface with proper attributes:

[ServiceContract]
public interface IMyService
{
    [OperationContract]
    [WebInvoke(Method = "GET", 
        ResponseFormat = WebMessageFormat.Json, 
        BodyStyle = WebMessageBodyStyle.Wrapped,
        UriTemplate = "/GetProviderUsers?providerId={providerId}")]
    List<string> GetProviderUsers(int providerId);
}

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
[BasicHttpBindingServiceMetadataExchangeEndpoint]
public sealed class MyService : IMyService
{
    public List<string> GetProviderUsers(int providerId)
    {
        // ...
    }
}

There is a SharePoint 2013 Workflow with activity Call HTTP Web Service that successfully calls this service and parses json response.

But right now the service allows unauthenticated calls. How can I change this? How can I update the service to allow only authenticated requests? And how can I set to Call HTTP to call the service by Workflow App Pool account?

I checked System.Net.CredentialCache.DefaultNetworkCredentials when service is called - credentions are empty. When I try to call the service with MyService.svc/ntlm/GetProviderUsers url - service call is failed with error "System.InvalidOperationException: Looking up a value using a key is not supported on an instance of".

Any ideas?

  • I'm having the same IvalidOperationException issue. The funny thing is the workflow is working just fine in one of my dev machines. – Nath Aug 19 '15 at 11:39

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.