Questions tagged [clientcontext]

15 questions
6
votes
3 answers

Create CSOM ClientContext with re-usability like singleton pattern

I have multiple methods being called on different user actions which is using ClientContext. Creating it on every method execution was causing performance issue. So I added it as static variable for re-usability, the performance improved with an…
Amna
  • 603
  • 7
  • 30
2
votes
0 answers

Identity client runtime library (idcrl) did not get a response from the login server

I use SharePointOnline.Portable library for uploading files to sharepoint. Everything worked recently, but now I am struggling from an error "Identity Client Runtime Library (idcrl) did not get a response from the login server". I tried to use user…
1
vote
0 answers

CSV file output is in Doctype HTML format

I am using the below code to read the csv file from SharePoint. But in ouput i am getting DOCTYPE HTML format output. Can anyone help me on this:- ''' from office365.runtime.auth.authentication_context import AuthenticationContext from…
Akshi
  • 11
  • 2
1
vote
1 answer

How to retrieve a Document Library by it's ID in SharePoint using jquery

I've a custom action on the CommandUI.Ribbon. It triggers a SharePoint add-in and sends the ListID allong as parameter. In the Add-in page, I try to upload a document (from a rest service). When I try to get the document library by it's ID, it…
Bryan van Rijn
  • 837
  • 10
  • 18
0
votes
1 answer

What is the best way to access SharePoint in C#

I'm updating an Excel complement I made 2-3 years ago with C#. The goal is to get some files that are stored on a SharePoint site, copy them locally and then open them. I have permission to access the SharePoint site, but I have no admin right over…
Bedasy
  • 13
  • 4
0
votes
0 answers

Uploading file to Sharepoint is failing with "HTTPError: 400 Client Error: Bad Request for url: " in python

I am trying to upload a file into Sharepoint but the code fails with the below error code. office365.runtime.client_request_exception.ClientRequestException: ('-2147024809, System.ArgumentException', 'Server relative urls must start with…
Rupesh
  • 5
  • 2
0
votes
0 answers

ClientContext Does not Contain a Definition for AuthenticationMode

I had a script that worked earlier today, but when I restarted my machine I now get ClientContext does not contain an definition for 'AuthenticationMode'. I have tried reinstalling the Nuget Packages. I have tried restarting my machine, no luck. I…
Mwspencer
  • 1,142
  • 3
  • 18
  • 35
0
votes
0 answers

what is the purpose of ctx.web while interacting with sharepoint document using python?

restapi package but I stuck in this "ctx.web". I didn't get any reference in google. so, please me to sort out my query. I searched in numerous website but I didn't get any breakthrough.
0
votes
0 answers

Initial connection to SharePoint site takes 100 seconds

I am building an application in C# that connects to a SharePoint website to backup data. The first time it connects it takes 100,000 milliseconds to get a response from the SharePoint site. While waiting the CPU usage is 0 and the Ram usage is…
tsfbsh
  • 1
  • 1
0
votes
2 answers

How to Overwrite SharePoint's Modified Date after Doing a SaveBinaryDirect?

I can push a file to SharePoint, but the modified date is always equal to the exact time I uploaded it. How can I overwrite the modified date to be equal to the value of the file? The code below was my failing guess after many searches. Using…
CodeMonkey
  • 1,795
  • 3
  • 16
  • 46
0
votes
1 answer

Retain Modified Date During SharePoint (online) File Transfers Using ClientContext

I'm essentially trying to download from SharePoint if it has a newer copy of a file or else push mine if mine is newer. I'm never concerned with merging changes in this application. Newer is simply better as the data is all a raw query from a…
CodeMonkey
  • 1,795
  • 3
  • 16
  • 46
0
votes
1 answer

Sharepoint Online ClinetContext.ExecuteQuery causes connection reset

I have an ASP.NET application hosted in IIS calling Sharepoint using ClientContext. On a production deployment, a call to ExecuteQuery causes the ASP.NET to throw net::ERR_CONNECTION_RESET. On the server, the following exception was thrown: at…
0
votes
0 answers

ASP.NET MVC: The sign-in name or password does not match one in the Microsoft account system

I wanted to fetch all files from the document library one of my Online Sharepoint site. For that, I have created 2 apps i.e. Console App and ASP.Net MVC apps Below is the code, using ASPNetDemo.Models; using Microsoft.SharePoint.Client; using…
Kishor T
  • 300
  • 1
  • 4
  • 15
0
votes
1 answer

Update clientcontext object on change in site address in c# winforms

I am trying to connect SharePoint from C# windows forms application. I am able to connect to SharePoint but after getting connected to SharePoint site If I decide to connect to some other site and change the site address at…
Krishna
  • 23
  • 4
0
votes
1 answer

How to Declare an Empty ClientContext

I am implementing a new authentication method according to the version of SharePoint in my .NET code, which may vary between the URL. However, I am unsure of how to declare an empty ClientContext variable. Below is my code snippet: Uri lUri = new…
gymcode
  • 4,431
  • 15
  • 72
  • 128