在 IIS 中将 System.Web.WebPages dll 添加到 80 的 bin 文件夹会在运行门户时出现错误“对象引用未设置为对象的实例”

问题描述 投票:0回答:0

我正在尝试修复 CSRF 问题,我在按钮单击事件中添加了 AntiForgery.Validate() 方法。要实现 CSRF,我需要 System.Web.Helpers 命名空间,它位于 System.Web.WebPages dll 中,因此它也被添加到参考中。当我将它发布并部署到 IIS 时,System.Web.WebPages dll 被添加到 Sharepoint 80 bin 文件夹中。当我运行该应用程序时,它显示“对象引用未设置到对象的实例”错误。 This is the error when i run the portal This is dll available in bin folder

我正在尝试修复 CSRF 问题,我在按钮单击事件中添加了 AntiForgery.Validate() 方法。要实现 CSRF,我需要 System.Web.Helpers 命名空间,它位于 System.Web.WebPages dll 中,因此它也被添加到参考中。当我将它发布并部署到 IIS 时,System.Web.WebPages dll 被添加到 Sharepoint 80 bin 文件夹中。当我运行该应用程序时,它应该显示“请求防伪令牌及其值”,但我看到了错误。

iis sharepoint-2013 .net-4.8 antiforgerytoken csrf-token
© www.soinside.com 2019 - 2024. All rights reserved.