Questions tagged [.net]

.net refers to the application framework installed on a Windows and SharePoint server.

Filter by
Sorted by
Tagged with
11 votes
3 answers
31k views

How to retrieve Users and Groups seperately from a "Person or Group" column via C# code?

I have a field in the discussion list, which allows the initiator of the discussion to specify the people to share the discussion with. This field is typed as 'Person or Group' that allows selection ...
Muhammedh's user avatar
  • 1,157
9 votes
2 answers
30k views

SharePoint client model and setting up lookup field

I have list A with "Title" column which is lookup column to List B. I need to update existing List B documents so that they will be linked to List A. However, SharePoint client context doesn't accept ...
Rishi's user avatar
  • 259
4 votes
3 answers
71k views

How to debug "(500) Internal Server Error." when calling web services?

I have an application where I am creating a SOAP request by hand and hitting a SharePoint instance. My problem is that the call returns the error: The remote server returned an error: (500) Internal ...
Abe Miessler's user avatar
  • 6,745
4 votes
3 answers
470 views

Cannot Query Document Library with > 5K folders

I have some SP .NET Object library code that will allow me to query for the contents of a specific folder in a document library. It worked fine in a UAT environment where there were only a few dozen ...
Chris Harrington's user avatar
4 votes
1 answer
15k views

CAML Query to retrieve list item by title

I'm trying to query for only this the item called Test1. I'm using this caml query but I'm returning all items in the list for some reason. private static int GetlookUpId(List hrLookupList, string ...
user3519261's user avatar
4 votes
1 answer
3k views

Rename the uploaded document in document library using the client side object model

I already uploaded the document in SharePoint document library using CSOM. Now I need to Rename the uploaded file using CSOM, how to achieve this via CSOM? pls look the code below and do the need ...
sundhar41's user avatar
4 votes
3 answers
296 views

.NET forms for SharePoint 2010 without InfoPath

Afternoon all, Can anyone advise if it's possible to create forms for SharePoint 2010 Standard (to submit to a list) without using InfoPath? My version of the product doesn't have InfoPath Services. ...
Steven D Andrews's user avatar
3 votes
4 answers
14k views

CSOM get all terms recursively in a single ExecuteQuery

I am working on some C#.NET code that loads the entire set of taxonomy terms for a site. The current code is structured like this: using (ClientContext context = new ClientContext(url)) { ...
Jack A.'s user avatar
  • 193
3 votes
2 answers
425 views

SP - How to set a unique row number programaticallly

I want to count all list items in my dynamic list to set ID For Every NEW RECORD. How to do this? int cnt = 0; int c = 0; foreach (TableRow tr in allVisibleRows) { SPListItem itemAdd = ...
Goshky's user avatar
  • 2,058
3 votes
2 answers
22k views

Downloading files from sharepoint programmatically C#

I would like to know what are benefits/drawbacks when using either of these methods for downloading a document from Sharepoint using Microsoft sharepoint library public void Download(string ...
Miran's user avatar
  • 61
3 votes
2 answers
16k views

Upload files to SharePoint Online using REST API

I'm trying to develop a console application which will upload files from the users client PC to a SharePoint Online site. I've written a version that used CSOM, but the file size is limited to 1.5Mb, ...
Lee's user avatar
  • 31
3 votes
2 answers
238 views

Upload file from One drive into SharePoint Online Site

Need to upload files from one drive to SharePoint Online Site without copying them into Desktop. How is this possible ?
Rym Ben Saleh's user avatar
3 votes
1 answer
116 views

Do we need to maintain same .net version in all SharePoint servers?

We have SharePoint 2013 on premises farm with two web severs and three app servers on windows server 2008 R2. We required to install .NET Framework 4.6.2 on only web servers to be compatible with ...
kumar's user avatar
  • 585
3 votes
1 answer
1k views

How to change choice field value in SharePoint programmatically

SPFieldChoice chFldCategory = (SPFieldChoice)lst.Fields["Category"]; chFldCategory.EditFormat = SPChoiceFormatType.Dropdown; chFldCategory.Choices....
jatin's user avatar
  • 31
3 votes
1 answer
1k views

SharePoint running really slow

We have a production environment that hosts 3 SharePoint Web Applications. We have 2 WFEs and 1 DB server. These are dedicated servers which we are hosted by a hosting provider. For almost 2 years ...
user787427's user avatar
3 votes
1 answer
3k views

SharePoint 2013 SAML/ADFS 403 Forbidden on ClientContext.ExecuteQuery()

To give a little background on my setup, I'm running SharePoint 2013 Foundation configured with SAML authentication using ADFS. I'm able to access the SharePoint site using a web browser from both ...
Jim Jr.'s user avatar
  • 31
3 votes
2 answers
895 views

SharePoint 2013 Edit & Continue with .NET 4.5.1 and Visual Studio 2013

Looking for an answer to this question since I heard of .NET 4.5.1, I've nearly given up the hope. Looks like no one has written anything about this anywhere. So now that 4.5.1 and VS2013 were ...
Kirschi's user avatar
  • 512
3 votes
1 answer
2k views

how to load a folder given just a ServerRelativeUrl using Microsoft.SharePoint.Client

In my application I have a url of a folder as retrieved by folder.ServerRelativeUrl() eg. /consulting/TeamSiteTemplate/Documents/ Now I want to get a list of folders inside this folder. I use this ...
Adam Butler's user avatar
3 votes
0 answers
293 views

How to convert List item to pdf

I would like to convert list items to pdf and I was searching on internet and itextsharp came up. I read somewhere that this open source has some problems in formatting all html tags. Does anyone ...
Burre Ifort's user avatar
  • 1,318
3 votes
1 answer
617 views

Internal User Versus External User Versus anonymous user in SharePoint 2013

I have read the new police for SharePoint licensing price, and it mentioned that no extra license price will be needed for any external web sites. But I have the following questions to know exactly ...
John Peter's user avatar
2 votes
3 answers
2k views

SharePoint DateTime conversion issue in ASP.NET

I am facing a strange issue in converting DateTime value received from SharePoint GetListItems method. Here is what the date string looks like - ows_DatePaid="2015-04-28T18:30:00Z". Now the problem ...
Nikhil Chavan's user avatar
2 votes
2 answers
3k views

How to get cookies after obtaining Azure AD access token to SharePoint Online

I have been able to successfully use the ADAL library to obtain an access token to SharePoint Online and execute CSOM queries. When I try to access a SharePoint Online URL directly using a WebRequest, ...
Steve's user avatar
  • 107
2 votes
1 answer
3k views

Sharepoint 2013 .NET CSOM CamlQuery Join

I am unable to create a working query with join in my .net csom application. I was using this article: http://msdn.microsoft.com/en-us/library/ff798388.aspx here is my code: ClientContext context =...
user2791953's user avatar
2 votes
1 answer
6k views

First time connecting to SharePoint Server 2013 from Console

This code is supposed to be the simplest code for connecting. Like a "Hello World" program: static void Main(string[] args) { var targetSite = new Uri("http://w2k12spps02/sitios/...
SuperJMN's user avatar
  • 123
2 votes
1 answer
517 views

How to debug a class library on a SharePoint 2013 Server?

I am learning to create a forms-based authentication for claims-based web application using custom membership and role provider based on the [msdn][1] link I will be building a class library to ...
user1166085's user avatar
2 votes
2 answers
4k views

SharePoint 2013 Security Token error ( The Security Token Service is not available.)

I'm needing help with debugging error with Security Token Service on Sharepoint 2013 The SharePoint Health Analyzer The Security Token Service is not available. Event Error Output An exception ...
John DK's user avatar
  • 63
2 votes
1 answer
53 views

How to design my site page in sharepoint, only want to use .net

I know asp .net but new at sharepoint.But i still setup sharepoint farm solution at azure it is working now i want to developer a site i am strting it with emptySP Project at .Net. step1: i take one ...
mehul's user avatar
  • 23
2 votes
2 answers
124 views

Which is the best possible way to connect to SharePoint Sites using Client Object Model

I came across a complex situation (imo) which is why I am asking this question. I am developing an application where in, I connect to all SharePoint Sites specified by user and all its sub sites using ...
Mani's user avatar
  • 61
2 votes
1 answer
185 views

connecting sharepoint to a polarlake ESB

How would one go about connecting sharepoint to an Enterprise Service Bus(ESB). The service bus being used is Polarlake. I'm presuming it requires a .NET web service to be created but essentially ...
topcat3's user avatar
  • 81
2 votes
3 answers
649 views

.NET Chart Controls in Sharepoint 2010 Sandbox

I'm trying to use the .NET Chart Controls in my Sharepoint 2010 Sandbox solution. I have downloaded and installed the MSChart for .NET 3.5 from http://www.microsoft.com/en-us/download/details.aspx?id=...
Høgsdal's user avatar
  • 161
2 votes
2 answers
2k views

Should I use Microsoft Graph or CSOM when integrating .NET with O365?

I have an existing integration based on CSOM, which I need to move from one .NET solution to another. In the process, I was made aware that Microsoft now has a graph API. I've tried to research ...
ptf's user avatar
  • 123
2 votes
2 answers
4k views

Looking for simple .net example to read a list

I am trying to find a simple example in c# or vb that shows how to connect and then pull in a list and display it in a gridview in asp.net. We are using SharePoint 2013 with Windows Authentication ...
Steve's user avatar
  • 21
2 votes
1 answer
763 views

Sharepoint Field or property "EffectiveInformationRightsManagementSettings" does not exist when trying to get a file

Using the .NET csom I am trying to retrieve the File that I just uploaded to sharepoint in order to check it in. Here is the code I am using to upload the file to sharepoint using (var stream = new ...
user avatar
2 votes
1 answer
497 views

Can't Open file binary in SharePoint.Client

This bit of code works for me: Microsoft.SharePoint.Client.File file = ctx.Web.GetFileByServerRelativeUrl(@"/Shared%20Documents/Email%20Body.html"); var _stream = file.OpenBinaryStream(); The ...
Dinerdo's user avatar
  • 749
2 votes
4 answers
4k views

Combine Two ListItemCollection objects

I have two ListItemCollection objects created after calling SharePoint GetItems with a Caml query - public Microsoft.SharePoint.Client.ListItemCollection GetItems(Microsoft.SharePoint.Client....
iniki's user avatar
  • 145
2 votes
2 answers
685 views

Use sharepoint 2007 as database for an ASP.NET MVC 4 application

I have built an ASP.NET MVC 4 C# application that has Many to One relationships. The application currently uses SQL as data provider. The following is the data connection string I use: <add name="...
Maher Manoubi's user avatar
2 votes
0 answers
248 views

SaveBinaryDirect returns "Unable to connect to the remote server" when code is deployed to our production server

I am trying to use SaveBinaryDirect to upload a file to a Sharepoint Online library. Everything works perfectly on two different workstations I tried on (Windows 10), but once deployed to our UAT ...
jaguarlover's user avatar
2 votes
0 answers
142 views

Get human-readable PermissionKinds for a particular RoleDefinition using CSOM

At a site collection level, I can look at the permission levels for the collection at /sites/siteCollectionname/_layouts/15/role.aspx, and then I can navigate to a particular permission level and see ...
sasfrog's user avatar
  • 314
2 votes
0 answers
46 views

Custom WSP does not work after migrating SharePoint 2010 SP1 on Server 2008 to SP2 Server 2012 R2 / .net 3.5 and 4.0

We have recently migrated SharePoint 2010 SP1 from Server 2008 to SharePoint 2010 SP2 on Server 2012 R2. The SharePoint web application runs well but some of the wsp we deployed does not work which ...
Viral's user avatar
  • 131
2 votes
0 answers
2k views

Update ID field with client object model

I'm trying to create items in a list and set the ID field programmatically (for use in a lookupfield in another list). This works serverside by setting the property ReadOnlyField of the field ID to ...
Mike246912's user avatar
2 votes
0 answers
2k views

Token Request Failed: Remote Server returned error (400) while fetching the token

My Requirement is to retrieve a document from SharePoint online using a .NET console application. I followed the steps in this link . But I get a failure Token request failed. {"The remote ...
aniyah's user avatar
  • 21
1 vote
4 answers
25k views

jquery checkbox checked and unchecked

i need to write a javascript code that make the checkbox if checked view a textbox and if not checked the text box is invisable automatically without having a button to click on it to do that <...
sarah's user avatar
  • 79
1 vote
2 answers
1k views

Use .NET CSOM to copy site lists with lookup columns

I'm using .NET CSOM to copy multiple list content from one site to another - essentially I'm migrating it. Because of the different list schemas I can't use built-in facilities like PowerShell Import/...
komsky's user avatar
  • 165
1 vote
1 answer
532 views

Empty CAML Query recursively search through document sets

I want to search for every single item within a document library. This is working just fine, but isn't working if the files within a document set in that library. I'm using an empty CAML query ...
user3519261's user avatar
1 vote
2 answers
1k views

Automating changes in web.config file on load balanced server

Issue We currently have a deployment process which is partially automated and part manual. The manual part involves making manual changing to the web.config for some things. We have two load balanced ...
Miyagi's user avatar
  • 623
1 vote
2 answers
6k views

Use SharePointOnlineCredentials in .net 6

I've been doing a lot of CSOM application for different clients, and have always been fine using SharePointOnlineCredentials to connect and do my things. However, I created a new project in .net 6 to ...
Hallemon's user avatar
1 vote
2 answers
3k views

Upload Multiple Documents to SharePoint Online using C#

I've been trying for a while to make this work, but I'm stuck. I've checked all the solutions around here and google, but can't seem to figure out why I keep getting an error. string targetFolder = "/...
WebDev's user avatar
  • 13
1 vote
1 answer
617 views

CSOM storing custom hidden field for document

I want to store a custom, hidden field/property on a document. This property should be hidden from the user in the UI, and I don't want to create a content type for this. Using var document = client....
Umair's user avatar
  • 163
1 vote
2 answers
1k views

SharePoint 2013 with .net framework 4.6.1

I am facing a requirement to install an external program on SharePoint environment. the program requires .net framework 4.6.1. Is there a problem in installing .net framework 4.6.1 on SharePoint ...
Habib's user avatar
  • 187
1 vote
1 answer
825 views

Using CSOM, can I fetch RoleDefinitionBindings for all items in a list in a single query?

I know I'm able to get RoleAssignments in my call to get a ListItemCollection, e.g. context.Load(items, x => x.Include(y => y.RoleAssignments)); Is there a way to also load each ...
sasfrog's user avatar
  • 314