Can't find the SharePoint 2013 version at the moment, so I compiled one through Visual Studio 2012 on SharePoint 2013.
Below contains the source code and assemblies, you can download it here.
Source files:
Microsoft.Practices.SharePoint.rar
Assemblies and WSP files:
Microsoft.Practices.SharePoint.Assembly.rar
[Update, 2013-03-11]
During test, I got the error below.
System.MethodAccessException: Attempt by security transparent method 'Microsoft.Practices.SharePoint.Common.ServiceLocation.SharePointServiceLocator.GetCurrentFarmLocator()' to access LinkDemand protected method 'Microsoft.Practices.SharePoint.Common.SharePointEnvironment.get_CanAccessSharePoint()' failed. Methods must be security critical or security safe-critical to satisfy a LinkDemand.
at Microsoft.Practices.SharePoint.Common.ServiceLocation.SharePointServiceLocator.GetCurrentFarmLocator()
at Microsoft.Practices.SharePoint.Common.ServiceLocation.SharePointServiceLocator.DoGetCurrent()
at Microsoft.Practices.SharePoint.Common.ServiceLocation.SharePointServiceLocator.GetCurrent()
In terms of here, Security Transparency in .NET 4 is changed.
I cannot find a simple solution to fix the problem, so I removed all method attributes "[SharePointPermission(SecurityAction.LinkDemand, ObjectModel = true)]".
You can download the source code and assemblies from here:
Microsoft.Practices.SharePoint(LessSecure).rar
thanks a lot
ReplyDeleteEric Fang'S Sharepoint Boat: "Microsoft.Practices.Sharepoint.Common" For Sharepoint 2013 >>>>> Download Now
Delete>>>>> Download Full
Eric Fang'S Sharepoint Boat: "Microsoft.Practices.Sharepoint.Common" For Sharepoint 2013 >>>>> Download LINK
>>>>> Download Now
Eric Fang'S Sharepoint Boat: "Microsoft.Practices.Sharepoint.Common" For Sharepoint 2013 >>>>> Download Full
>>>>> Download LINK qX
This comment has been removed by the author.
ReplyDeleteHi! I've been using the original code and your (less secure) version for years now.
ReplyDeleteA customer has been complaining about the fact that his values stored at a farm level using the IHierarchicalConfig implementation are not updated at site level.
I found there is a bug in the SPFarmPropertyBag. It doesn't handle the cache interval properly in the GetSettingStore() method. In the first IF, it compares the lastLoad, but in the second IF it doesn't.
The SPWebAppProperyBag has the correct code. I downloaded your version of the source code again, fixed it and deployed it: Customer happy = me happy ;-)
Thank you for source code!!
Regards, Wouter Heesakkers
Well done! That's amazing!
DeleteThanks Eric for this. We are running into the same issue. I looked at your RAR file and there are multiple DLLs in there. Can you point me to the DLL that we can deploy on our sharepoint servers to see if this problem goes away?
ReplyDeleteThis is for developers, and should only be used as a "draft".
DeleteIf any error pop up, you need to debug and then fix it.
(I need to know much, much more details and test to figure out the cause.)
I seem to get this error even when running the site in 2010 compatibility mode. Any thoughts on why?
ReplyDelete