I have a internet mapping for a SharePoint site that works fine. However, the same site's WCF REST service causes a '401 Unauthorized' error when accessed via a coded functionality.

The same code works ok with my default address ( the address that is not mapped as Internet in AAM)

1 Answer 1


That may be because the default address is the server name, and your code is run on the server itself. In that case, everything is fine.

But if you use another domain name to target the server from the server itself, you may face the "loopback check" feature of Windows Server. You can test quickly by disabling this feature, like mentionned in method 2 of MS support article (method 2 is the fastest to test and confirm, but probably not the safest).

  • We went ahead with method 1 and it worked. Thanks :)
    – Muhammedh
    Commented Apr 14, 2015 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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