Reputation: 675
I am trying to access a SharePoint 2016. If I am using that code in a .Net Framework 4.7.1 application everything works as expected:
using (var clientContext = new ClientContext("<sharepoint_url>"))
{
clientContext.Credentials = new NetworkCredential("username", "password");
Web web = clientContext.Web;
clientContext.Load(web);
clientContext.ExecuteQuery();
}
However if I am using the exact same code in a .Net 8.0 Project, the ExecuteQuery fails with a 401 Unauthorized Error.
I found the same problem already mentioned here: https://stackoverflow.com/a/75125846
However I am not sure, if there is really no solution for that problem. Maybe anyone knows, why this is not working in .Net 8.0?
Thanks!
Upvotes: 1
Views: 157