Question

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)

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top