问题描述
我正在使用CSOM来管理我们的sharepoint 2010服务器上的文件。今天我注意到,当文件名包含+字符时,CSOM无法使用其serverRelativeURL引用该文件。还有其他人对相同或类似的问题进行了解释吗?
以下代码适用于所有不包含+字符的文件。
我尝试过各种编码serverRelativeURL但没有任何效果。
====
ClientContext = New ClientContext(m_sitePath)
f = ClientContext.Web.GetFileByServerRelativeUrl(serverRelativeURL)
ClientContext.Load(f)
f.CheckOut()
ClientContext.ExecuteQuery()
----
谢谢Ioannis
Hi,
I am using CSOM to manage files on our sharepoint 2010 server. Today I noticed that when the filename contains the + character, the file cannot be referenced using its serverRelativeURL by CSOM. Has anyone else explerienced the same or similar issue?
The following code works fine for all files that do not contain the + character.
I tried all sorts of the encoding the serverRelativeURL but nothing worked.
====
ClientContext = New ClientContext(m_sitePath)
f = ClientContext.Web.GetFileByServerRelativeUrl(serverRelativeURL)
ClientContext.Load(f)
f.CheckOut()
ClientContext.ExecuteQuery()
----
Thanks Ioannis
这篇关于Sharepoint 2010:当名称包含+时,文件变得不可访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!