间接使用 Web 服务时出现 SharePoint 备用访问映射错误

发布于 2024-12-26 04:24:11 字数 970 浏览 1 评论 0原文

SharePoint 网站 = http://myexample:3500

SharePoint 测试人员 (域管理员、SharePoint 网站集管理员)= IAmKyle

备用访问映射:我将其保留为默认值 http://myexample:3500 映射到自身,并且该区域是“默认”。

我的代码被部署为场解决方案,我的 .dll 位于 GAC 中。我激活了我的网站集上的一项功能(网址位于上方)。该代码的作用是,当用户更新 SharePoint 项目时,我的代码执行 LINQ 查询来查找“相关”项目。然后更新相关项目。以下是我收到的错误:

在 Windows 事件日志上: 加载和运行事件接收器 [我的接收器程序集] 时出错。未将对象引用设置为对象的实例。

在 SharePoint ULS 事件日志上: 与我在 Windows 事件日志中看到的错误相同。另外,我收到有关未为 http://myexample:3500 配置“备用访问映射”的错误,但我不再得到它们了。不知道为什么,我什么也没改变。

在 IIS 日志上 收到一些我应该能够访问的页面的 401 响应。但是,在某些情况下它只显示页面的尾部,例如“/mysite/mypage”,所以我不确定完整的 URL 是什么。

这些错误非常令人困惑,我的代码 100% 在我的测试系统上运行。我应该寻找哪些网络或共享点配置?考虑到我的代码在我的测试环境中确实有效,我假设它本身工作得很好。当然,我在测试上拥有更多权限,因为我在测试上的用户名是创建农场的用户。

谢谢。

SharePoint web site = http://myexample:3500

SharePoint tester (admin on domain, admin on SharePoint site collection) = IAmKyle

Alternate Access Mapping: I left it at the default which is http://myexample:3500 maps to itself, and the zone is "default".

My code was deployed as a farm solution and my .dll is in the GAC. I activated a feature on my site collection (url is above). What the code does is, when the user updates a SharePoint item, my code executes a LINQ query finding "related" items. Then the related items are updated. Here are the errors I get:

On Windows Event Logs:
Error loading and running event receiver [my receiver assembly]. Object reference not set to instance of an object.

On SharePoint ULS event logs:
Same error as I see in Windows Event logs. Also, I was getting errors about "alternate access mapping" not being configured for http://myexample:3500 but I'm not getting them anymore. Don't know why, I haven't changed anything.

On IIS logs
Getting some 401 responses for pages that I should be able to access. But, it only shows the tail end of the page in some cases e.g. "/mysite/mypage" so I'm unsure what the full URL is.

These errors are very confusing, my code 100% works on my test system. What network or sharepoint configurations should I be looking for? I'm assuming my code itself works fine considering that it does work on my test environment. Of course, I have more permissions on test since my username on test is the user who created the farm.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怎樣才叫好 2025-01-02 04:24:11

当您尝试激活该功能或实际更改列表项时,您是否会遇到这些错误?

另外,您是否尝试过将 VS 调试器附加到进程并查看发生了什么?

Do you get these errors when trying to activate the feature or when actually making a change to a list item?

Also, have you tried attaching the VS debugger to the process and having a look at what is going on?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文