Hot answers tagged

3

I'm grasping at straws here, there isn't a lot of information on the topic about this. I did stumble upon a post that may give clues as to why it is happening and perhaps a work around: SPFile.MoveTo(), at first glance, looks to be a very straightforward method where a file can be moved from one folder to another. Trying to use it and have an ...


2

I figured it out. You can use SPFile to check if the file exist in the library and then move it if it does. SPFile file = site.GetFile("/Final Candidates/" + CName); if (file.Exists) { file.MoveTo("Draft Candidates/" + CName, true); } Reference: http://stackoverflow.com/questions/359672/how-to-determine-if-a-file-exists-in-a-sharepoint-spfolder


1

Try to get a new instance of the SPFile object right before you try the .CheckOut() instruction. I may be wrong, but I think you are experiencing a pretty common transaction related issue. if (file != null) { web.AllowUnsafeUpdates = true; Stream readStream = file.OpenBinaryStream(); //file is SPFile type SPFile ...


1

Try This, Declare a Client context ctx and get your list/library name: RoleDefinition roleDef = ctx.Web.RoleDefinitions.GetByType(RoleType.Reader); RoleDefinitionBindingCollection roleDefBinding = new RoleDefinitionBindingCollection( ctx ); ctx.ExecuteQuery(); roleDefBinding.Add( roleDef ); CamlQuery query; query = ...


1

AFAIK, nothing in the client-side API can allow this. However, there's an old technology called "Front-Page RPC" (the name itself shows you how old it is!) that may be still available on SP2013 (even if it's kind of deprecated/not really documented). It is still there since it's used by Office applications to communicate with SharePoint. FP RPC is a ...



Only top voted, non community-wiki answers of a minimum length are eligible