Dan Abramov
Dan Abramov

Reputation: 268255

ThreadAbortException when anonymously accessing SharePoint lists

In the legacy code I'm working with, a web service accesses SharePoint lists.
Some of these lists require special permissions so user credentials are requested at first access.

However after I added some logging to application I noticed that actually the following happens when user tries to call the web service first time:

It essentially means that code prior to SharePoint calls runs twice in this scenario.
What is the right way to show credential box before any code is run?
Is this the case when anonymous access is IIS should be disabled? I suspect so but I'm too inexperienced in configuring web projects so I feel confused.

Upvotes: 1

Views: 727

Answers (1)

Nat
Nat

Reputation: 14295

The ThreadAbortException is normal when an ASP.Net application does a redirect. In this case, you are debugging so you catch the exception.

Best advice is to ignore the error as it is an expected exception.

Upvotes: 3

Related Questions