none
MSP 2010 Sharepoint URL with Claims based Windows authentication and WCF service, Not authorized. RRS feed

  • Question

  • I have a MSP 2010 Sharepoint URL that has Claims based authentication mode and authentication type as Windows(NTLM).

    In this share-point URL i have a custom WCF service that i need to access from an external web asp.net client.

    when trying to access with basicHttpbinding and Clientauthentication Type NTLM, the error 401 unauthorized error comes with message and stack trace as follows.

    Exception Message: The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'.
    Exception StackTrace: 
    Server stack trace: 
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory)
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at BridgeTest.p14ProSightPSIExtension.IMspDataService.isAlive()
       at BridgeTest.p14ProSightPSIExtension.MspDataServiceClient.isAlive() in D:\BridgeTest\BridgeTest\BridgeTest\Service References\p14ProSightPSIExtension\Reference.cs:line 377
       at BridgeTest.Form1.btnTest_Click(Object sender, EventArgs e) in D:\BridgeTest\BridgeTest\BridgeTest\Form1.cs:line 56

    Exception InnerException: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
    Exception Source: mscorlib
    Exception TargetSite: Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)

    Wednesday, June 17, 2015 5:00 PM