0
votes

I have installed a SharePoint 2013 in my Windows server 2012 development environment. I have configured everything and it worked fine. The problem is that from the machine where the SharePoint is hosted, it asks me for the credentials in a loop, it always responds with 401. If I access from another PC it works. I am using the same DNS to access from both sides. My authorization is with windows.

The above does not matter to me, my problem is that I have an asp.net API on the same server that makes use of ClientContext to connect to this SharePoint. When the API is hosted on the server and makes a request using the ClientContext, it returns a 401. If my API is on my computer launched from visual studio there is no problem. In addition, I have also tried to deploy the API in another environment but pointing to my development environment and everything works fine.

The problem is when I try to access from the same machine where SharePoint is hosted. (The central administration works without problems).

1

1 Answers

0
votes

I answer my question.

The problem is related to Loopback Check. It must be disabled for calls from the SharePoint server itself to work.

  1. To disable it go to the registry Ctrl+R and type regedit.
  2. Enter: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa and add DWORD (32-bit) Value.
  3. The name is as follows: DisableLoopbackCheck.
  4. The value in hexadecimal is: 1

I add the post where I found the solution.

After this it works correctly!