值未落在预期范围内。从文档库中签出文件时在 Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl

发布于 2024-11-19 09:01:17 字数 637 浏览 4 评论 0原文

我有一个外部网站点,其中有一个共享文档文件。我可以上传 文件很好,查看它们等等...但是当我尝试检查一个文件时 进行更改时,我立即得到以下信息:

值未落在预期范围内。在 Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, 布尔值 includeQueryString、布尔值 canonicalizeUrl) 在 Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(字符串 字符串) 在 Microsoft.SharePoint.SPWeb.GetFile(String strUrl) 在 Microsoft.SharePoint.ApplicationPages.Checkin.get_File() 在 Microsoft.SharePoint.ApplicationPages.Checkin.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(布尔值 includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

并且以管理员身份登录。任何想法都会 非常感谢。

I have an extrnet site that has a shared document file. I can upload
files just fine, view them, etc... But when I try to check one out to
make changes, I immetiately get this:

Value does not fall within the expected range. at
Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl,
Boolean includeQueryString, Boolean canonicalizeUrl)
at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String
strUrl)
at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
at Microsoft.SharePoint.ApplicationPages.Checkin.get_File()
at Microsoft.SharePoint.ApplicationPages.Checkin.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

And this is logged on as the administrator. Any ideas would be
greately appreciated.

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

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

发布评论

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

评论(2

旧竹 2024-11-26 09:01:17

我之前曾在代码为 32 位或自定义 .NET 代码在高于 3.5 的 .NET 版本上运行时尝试访问在 64 位操作系统上运行的系统时收到此错误。

我不完全确定是哪个,否则就像错误所述,并且传递到 GetWebRelativeUrlFromUrl 的 url 与场中的任何 SPSites 都不匹配。

I have previously received this error when trying to access a system running on a 64 bit OS when the code is 32bit OR the custom .NET code is running on a version of .NET higher than 3.5.

I am not completely sure which, otherwise it is just as the error says and that the url being passed into the GetWebRelativeUrlFromUrl does not match any SPSites in the farm.

梦在夏天 2024-11-26 09:01:17

我在 Web.GetFile 方法上发生了这种情况。在发现此功能仅在文件位于当前站点而不是根站点(在我的情况下)中时才有效后,问题得到解决。将文件复制到工作站点的站点资产并更改其工作文件路径后

using (Stream tplStream =   
SPContext.Current.Web.GetFile("/sitename/SiteAssets/file.docx").OpenBinaryStream())

it was occurred for me on Web.GetFile method. and it was resolved after finding that this function only works if the file is in the current site and not the root site in my case. after copying the file in the site assets of working site and changing the file path it works

using (Stream tplStream =   
SPContext.Current.Web.GetFile("/sitename/SiteAssets/file.docx").OpenBinaryStream())
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文