sharepoint

Will using a SPListItemCollection returned from a function reopen the SPWeb?

拈花ヽ惹草 提交于 2019-12-23 10:20:29
问题 After reading Stefan Gossner's post about disposing objects and this question about Cross method dispose patterns, I found that I was guilty of accidentally reopening some SPWebs. I know in Stefan Gossner's post he mentions you should dispose of an SPWeb after you are finished with any child object. However, the microsoft documentation mentions Caching the SPListItemCollection object. Is the following code correct? Would the returned SPListItemCollection reopen an SPWeb object? Is there any

Sharepoint `Unsupported segment type` when checkin/chekout file

那年仲夏 提交于 2019-12-23 09:20:35
问题 I'd like to use the checkout/checkin feature on the OneDrive REST API : https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout I'm facing two issues: 1st issue - the file info API returns publication property as published , even the file is manually checked out Request: https://graph.microsoft.com/v1.0/sites/SITE_ID/drive/items/FILE_ID?select=name,id,publication Response: { "id": "01KJOOXJHF77OPSR7HWVCKSTHBQJQZEBJI", "name": "diamond.mmap", "publication": { "level

Visual Studio Unexpectedly Adding Feature on Load

有些话、适合烂在心里 提交于 2019-12-23 09:18:35
问题 I have a SharePoint 2010 solution in Visual Studio 2013. Every time I close and reopen Visual Studio, a new feature is added to the solution with one list inside it. The list was removed from another feature that it should be in. It is always the same list. As soon as I open the solution this pops up in the Output window before I do anything... A new feature Feature2 has been added to the project Solution C:\Code\Solution\Package\Package.package (0,0): Added Feature2 to Package What is

Sharepoint 2013 site NTLM authentication javascript doPostBack doesnt work in Safari&iPad

Deadly 提交于 2019-12-23 08:06:07
问题 I have a really interesting problem. We have a site created with sharepoint 2013. We use Windows - NTLM authentication. In a page includes custom discussionListWebPart, we have a filter button which use javascript doPostBack function with webpart ClientID and filter parameters. exp: __doPostBack("ClientID","params"); When we do filter, just discussion list webpart do post back and no any request for the any part of Page. That means the page does not reload. This is what we expected. It works

ASPMenu in Safari 7.1 Not Rendering Properly in SharePoint 2010

淺唱寂寞╮ 提交于 2019-12-23 07:49:27
问题 Has anyone else encountered an issue with the newest release of Safari 7.1 on Mac and iOS8 that breaks an ASPMenu control within SharePoint 2010? The ASPMenu worked fine before hand, but now after the update it has decided to render the contents incorrectly. I've tried setting the Page.ClientTarget = "uplevel", as well as modify the compat.browser file to include the adapter "System.Web.UI.WebControls.Menu" for Safari, but neither option is helping fix the issue. Can anyone help? The menu

Web.GetFileByServerRelativeUrl throws “Value does not fall within expected range”

。_饼干妹妹 提交于 2019-12-23 07:03:48
问题 I have a SP Online site where I store Documents, I have no issues adding/retrieving documents but in the delete flow I get an error during retrieval of a File object. public static void DeleteDocument() { using (ClientContext ctx = ClientContextFactory.Create("https://my-sponline-site.sharepoint.com/sites/documentsite")) { Web web = ctx.Web; ctx.Load(web); ctx.ExecuteQuery(); string relativeUrl = "/Documents/images.jpg"; File file = web.GetFileByServerRelativeUrl(relativeUrl); ctx.Load(file);

File not found exception once deployed to Server

情到浓时终转凉″ 提交于 2019-12-23 06:01:34
问题 I am using the below code to Upload an Image file to a SharePoint Document Library. The code works fine locally but once deployed to server, i get the Exception as file not found. String fileToUpload = FlUpldImage.PostedFile.FileName; //@"C:\Users\admin.RSS\Desktop\Photos\me_skype.jpg"; String documentLibraryName = "SiteAssets"; if (!System.IO.File.Exists(fileToUpload)) throw new FileNotFoundException("File not found.", fileToUpload); SPFolder myLibrary = web.Folders[documentLibraryName]; //

File not found exception once deployed to Server

自闭症网瘾萝莉.ら 提交于 2019-12-23 06:01:19
问题 I am using the below code to Upload an Image file to a SharePoint Document Library. The code works fine locally but once deployed to server, i get the Exception as file not found. String fileToUpload = FlUpldImage.PostedFile.FileName; //@"C:\Users\admin.RSS\Desktop\Photos\me_skype.jpg"; String documentLibraryName = "SiteAssets"; if (!System.IO.File.Exists(fileToUpload)) throw new FileNotFoundException("File not found.", fileToUpload); SPFolder myLibrary = web.Folders[documentLibraryName]; //

Problem - Ajax call on IE only works when another page with the same Ajax call is open in the browser

江枫思渺然 提交于 2019-12-23 05:59:43
问题 I am trying to have a POST Ajax call to a serverside API from SharePoint Content editor. The API returns list of URL and Title. Then the URL is added dynamically into the SharePoint List View. This works fine in Chrome but not on IE. I am getting XMLHttpRequest: Network Error 0x2ef3, could not complete the operation due to error 00002ef3 I created a test HTML with the Ajax call on my local and it works fine. The strange think is it works fine on the SharePoint page on IE if I had the local

SoapServerException when calling GetListItems

戏子无情 提交于 2019-12-23 05:44:33
问题 I am trying to call GetListItems in a specific calendar in sharepoint site. However everytime I try to call GetListItems I get an error saying: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' My calendar is in a sharepoint site whose URL is: https://myteam.company.com/sites/TeamSite/Lists/Calendar My url for my lists service is: https://myteam.company.com/sites/TeamSite//_vti_bin/Lists.asmx And I call getlistitems as follows: appSettings = ConfigurationManager