关于sharepoint2013的SPUtility.GetGenericSetupPath()方法过期解决办法

有个时候需要读取layouts下的xml文件,因此需要知道路径,以前在SP2010用的SPUtility.GetGenericSetupPath()方法获取。现在SP2013提示过期否决

看2个结构分析

Layouts-Folder-SharePoint-2013

 

在SP2013使用SPUtility.GetVersionedGenericSetupPath().

Conditional-Compilation-Code-Example

For an example of how this can effect you code - look below. This code is returning a Url to one of our pages that's deployed to the layouts folder. If we had not made change to include the "15" it would have pointed to the 14 hive - which is good for a 2010 solution running on 2013, but not good for us

Layouts-Folder-SharePoint-2013-Example

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值