0

We've got a high trust application which ok, in the mornings seem to 'not work' but then after the first hour was fine. But now it just blankly doesn't work with the non helpful.

System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)

Any ideas?


Edit

Ok, so bit more information, we managed to plug in fiddler into the solution using the lines

<system.net>
  <defaultProxy>
    <proxy usesystemdefault="False" bypassonlocal="False" proxyaddress="http://127.0.0.1:8888" />
  </defaultProxy>
</system.net>

These showed the results coming back but labelled 401.

5
  • Did your High Trust cert expire?
    – user6024
    Commented Feb 11, 2021 at 17:50
  • Only been on a month max, cert set to expire in a few years Commented Feb 11, 2021 at 19:37
  • This strange, because the behavior is interrupted in some moments and worked in another; are possible some oscillation in network were this High Trust App is deployed? This behavior persists? Commented Feb 11, 2021 at 23:09
  • Yeah, I'm thinking the load balancer either spanning the app side or the SharePoint side is playing havok with Authentication. But tbo I just code the app and don't have too much input into the servers... Commented Feb 11, 2021 at 23:20
  • Got a feeling with one user being a non claims user somehow so got that on my to do as well.... Commented Feb 11, 2021 at 23:25

1 Answer 1

0

In the end we ran

Set-SPAppPrincipalPermission -Site $web -AppPrincipal $appPrincipal -Scope Site -Right FullControl

and then did a iisreset on the share point server.

For us we have 3 iis servers for the high trust solution, load balanced and then 2 sharepoint frontend servers. We did bypass the loadbalencer for the 2 sharepoint frontends -but we'll probably bring that back into the fray for dependency.

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.