0

I am running on-Prem Sharepoint 2013 and writing a web application that will access SharePoint lists using CSOM.

I am using Claims Authentication and have Anonymous Access allowed for the web app.

Here are the first few line of CSOM:

    Dim ouritems As ListItemCollection
    Using cc As New ClientContext(siteURL)
        Dim ourList As List = cc.Web.Lists.GetByTitle(listTitle)
        cc.Load(ourList)
        cc.ExecuteQuery()

Everything is working just fine.

I now turn Anonymous Access off.

My ExecuteQuery (the first access to SharePoint in the application) now fails with an exception: Too many redirections were attempted.

Can anyone explain the connection between turning of Anonymous Access and the exception?

0

Here's the answer. I went to IIS to check the options there for my SharePoint web app and noticed that Forms Authentication was enabled. As this web app is only for an intranet, I turned Forms Authentication off.

That broke everything. Eventually I found this article that explains that even though the application is using Claims Authorization, somewhere deep in SharePoint, Forms Authentication is required!

https://social.technet.microsoft.com/Forums/office/en-US/ab9a45a9-bc39-41c2-9661-5a4b33f610db/why-does-sharepoint-2013-need-quotforms-authenticationquot-to-work?forum=sharepointgeneral

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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