如果Owin自动应用启动在Web API中为true,则无法加载文件或程序集“ Microsoft.SharePoint.Client.ServerRuntime”

问题描述

我正在尝试使用Microsoft.Owin实施Web API身份验证。

此Web API包含执行SharePoint操作的SharePoint 2019 CSOM库(Microsoft.SharePoint.dll和Microsoft.SharePoint.Client.Runtime.dll)。

完成API身份验证开发后,它会导致以下错误,如运行Web API时的屏幕快照所示。

但是,在Web API的Web.Config文件添加<add key="owin:AutomaticAppStartup" value="false" />解决了该问题,但是由于这个原因,API无法使用Owin身份验证。

如何在具有SharePoint 2019 CSOM库的Web API中实现身份验证?

非常感谢您的帮助!

enter image description here

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)