none
Double-hop issue with WCF Service and Sharepoint Service both hosted on same iis server RRS feed

  • Question

  • I am getting the below exception when a WCF service is trying to access a sharepoint site for content. My IIS server version is IIS 8.0

    Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
    
    [WebException: The remote server returned an error: (401) Unauthorized.]
       System.Net.HttpWebRequest.GetResponse() +6592536
       System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +55
    
    [MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''.]
       System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10733331
       System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Monday, August 25, 2014 4:32 PM

Answers

  • Hi,

    For this scenario, you could try to enabled Anonymous access in iis(Within the authentication, enable the anonymous authentication).

    Then, you could enable Anonymous authentication on the Web application for share point:

    The resolution is to add new settings in web.config of your web application.

    <appSettings>
            <add key="aspnet:AllowAnonymousImpersonation" value="false" />
    </appSettings>

    Regards

    Tuesday, August 26, 2014 7:08 AM
    Moderator