-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Developer environment
Windows
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
No response
Describe the bug / error
We recently have been experiencing an issue when loading the ServerRelativePath property of the Web object. We understand that web server update from version 16.0.25722.12007 to 16.0.25729.12006 broke this (ServerRelativePath) property. Microsoft's workaround to use Web.RootFolder.ServerRelativePath property is not foolproof because the access fails if the user does not have sufficient permissions. Unfortunately, Web.ServerRelativeUrl is not a solution either since it doesn't support paths containing % and # characters (refer to https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/supporting-and-in-file-and-folder-with-the-resourcepath-api).
Steps to reproduce
- Create a SharePoint context with any URL.
- Try to retrieve the Web.ServerRelativePath property.
- Notice the exception that comes up when you try to retrieve the property.
Expected behavior
There shouldn't be any exceptions, and the property should be retrieved.