I'm trying to implement Web API authentication using Microsoft.Owin.
This Web API contains SharePoint 2019 CSOM libraries (Microsoft.SharePoint.dll & Microsoft.SharePoint.Client.Runtime.dll) that performs SharePoint Operations.
After completing the API authentication development, it resulted in following error as shown in screenshot when the Web API is run.
<add key="owin:AutomaticAppStartup" value="false" /> in Web.Config file of Web API resolved the issue but due to this, API is unable to use Owin Authentication.
How can I implement Authentication in this Web API having SharePoint 2019 CSOM libraries?
Any help is much appreciated!