简体   繁体   English

完整路径必须少于 260 个字符 - SSRS

[英]full path must be less than 260 characters - SSRS

I point one of the menu items in my web application to the below path我将 Web 应用程序中的菜单项之一指向以下路径

http://localhost/Reports/Pages/Folder.aspx?ItemPath=/Parent Reports/Child

Reports报告

When I click on it the report manager UI displays the following message:当我单击它时,报告管理器 UI 会显示以下消息:

The path of the item ' http://localhost/Reports/Pages/Folder.aspx?ItemPath=/Parent Reports/Child Reports ' is not valid.项目“ http://localhost/Reports/Pages/Folder.aspx?ItemPath=/Parent Reports/Child Reports ”的路径无效。 The full path must be less than 260 characters long;完整路径必须少于 260 个字符; other restrictions apply.其他限制适用。 If the report server is in native mode, the path must start with slash.如果报表服务器处于本机模式,则路径必须以斜杠开头。

I had the same issue when one of my developers were trying to edit a report in ssrs, using the report builder当我的一位开发人员尝试使用报告生成器在 ssrs 中编辑报告时,我遇到了同样的问题

the problem started when he was accessing the data source which was on a different path.当他访问位于不同路径上的数据源时,问题就开始了。

I soon as I granted that specific data source, the permissions below, it all worked fine:我一授予该特定数据源(以下权限),一切正常:

在此处输入图片说明

There is certainly a 260 path limit in Windows (or is it NTFS?). Windows 中肯定有 260 个路径限制(或者是 NTFS?)。 Perhaps the path to your solution folder and child folders and file name for the aspx page that services that request is longer than 260 characters.也许您的解决方案文件夹和子文件夹的路径以及请求服务的 aspx 页面的文件名超过 260 个字符。 If this is the case, try moving the solution folder closer to the c:\\ root and try again.如果是这种情况,请尝试将解决方案文件夹移近 c:\\ 根目录,然后重试。

Note that Windows does implement a solution to the legacy MS-DOS 260 char path limit.请注意,Windows 确实实现了对旧版 MS-DOS 260 字符路径限制的解决方案。 It's the Long UNC path format, which starts with \\\\?\\ such as \\\\?\\c:\\path\\file.txt .它是长 UNC 路径格式,以\\\\?\\开头,例如\\\\?\\c:\\path\\file.txt

If you have access to the source code of the web service producing this error, you might try digging around in the service code that converts the URL arguments into local file paths and see if tacking the \\?\\ on the front helps matters at all.如果您有权访问产生此错误的 Web 服务的源代码,您可以尝试深入研究将 URL 参数转换为本地文件路径的服务代码,看看在前面添加 \\?\\ 是否有帮助。

It also seems odd that you would get this file path error message on a URL.在 URL 上收到此文件路径错误消息似乎也很奇怪。 Check your code (or the code of the web service) to see if somebody is using Path functions where they should be using URI functions.检查您的代码(或 Web 服务的代码)以查看是否有人在他们应该使用 URI 函数的地方使用了 Path 函数。

Finally, note that your example contains space characters, both in the path and in the URI.最后,请注意您的示例在路径和 URI 中都包含空格字符。 Space characters are definitely prohibited in URIs; URI 中绝对禁止使用空格字符; you will need to URI escape them with %20 to make them valid URIs.您需要使用 %20 对它们进行 URI 转义,以使它们成为有效的 URI。 That could be the real cause of the problem - the web service is not actually receiving the whole URI you're sending, since URI parsing will stop at the first space character.这可能是问题的真正原因 - Web 服务实际上并未接收您发送的整个 URI,因为 URI 解析将在第一个空格字符处停止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM