Questions tagged [console-application]
Questions related to SharePoint Console Applications
58
questions
0
votes
1answer
40 views
Update a list item using Client side object module code and prevent sharepoint list workflow 2013 from been executed
I have a custom list inside our sharepoint online classic team site collection. and i define a workflow 2013 on the custom list. where the workflow will be executed when creating and editing the list ...
1
vote
2answers
44 views
Uploading files to sharepoint with clientContext giving Error
I am trying to upload documents to a specified sharepoint location but I am getting the error System.Net.WebException: 'The remote server returned an error: (400) Bad Request.'
I believe this has ...
0
votes
1answer
27 views
share point document version still incrementing even after disabling the versioning and minor versioning
I have a SP 2013 document library with content approval and versioning enabled. Now through a console application I am disabling the content approval and versioning to updated the document and after ...
1
vote
2answers
398 views
How to Update Author (Created By) field in SharePoint 2016 using CSOM Programatically
I want to Update the Author field of Folder property/item property. I have seen many posts online, I tried different link but I didn't get the Success. I followed This Link. I didn't get any error ...
0
votes
1answer
39 views
Technique to run an event receiver from console app
There's a imported list with 500.000 items and an event receiver attached to it (itemAdded/Updated). I need to run the event receiver on older items meeting specific criteria but I don't want to ...
0
votes
0answers
205 views
Nested JSON data to SharePoint list item
So I've recently been tasked with finding a way to retrieve data from an api call, then upload that data back to a SharePoint list item and all followed by that it has to be pulled back into a PowerBi ...
0
votes
1answer
815 views
Update Column values for the files inside a folder in Sharepoint Library using CSOM
How to update columns inside a folder in sharepoint library using CSOM. I have a Document library in which I create folders programatically and copy files from another library into the created folder....
0
votes
1answer
25 views
Client Side Code To Capture Calculated Field Value
I am using C#.Net to query Sharepoint site. I am able to return all the data I need except ONE field, which the culprit seems to be due to it is a calculated field so it does not "exist" in my query ...
0
votes
1answer
208 views
How to call SharePoint URL from Console Application
Hi how can I call this API
http://YOUR_SERVER_URL/PATH_TO_SITE_CONTAINING_LIST/_vti_bin/owssvr.dll?Cmd=ExportList&List={YOUR_LIST_GUID}
from Console Application
I used below Code
string ...
1
vote
2answers
320 views
Console app not triggering ItemUpdated event in list
I have created a console app in C# .Net. The app is updating two fields in an item in a list. The list has an eventreceiver and when the item is updated it copy every value from all fields to another ...
2
votes
0answers
60 views
Is it feasible to check PDF accessibility using c#?
I need to check accessibility for uploaded pdf using any dll or any other way. Is it feasible programmatically using c#.
Accessibility of pdf means pdf contain header or footer and misspelled word in ...
2
votes
1answer
235 views
Using CSOm create site and then list inside it
How can we create a site and then create a list in Sharepoint 2013 console app using CSOM. How to set the wait so we know that much time it takes to create a site and then create a list ...
2
votes
0answers
628 views
Connecting to https ADFS site with CSOM unauthorized for internal users
I am trying to setup my client context for usage in a SharePoint 2013 site.
This new site appears to have mixed authentication, and because of that, I had to add the X-FORMS_BASED_AUTH_ACCEPTED ...
2
votes
1answer
62 views
How do I locate a certain file in SharePoint using C# console app
I'm building a console app which gets a file from a folder in sharepoint, processes it, and then moves it to a "Processed" folder on Sharepoint. I've got my app to login but having real trouble ...
2
votes
1answer
244 views
Why the HttpContext is null within event receivers, console applications and timer jobs
Why the HttpContext is null within event receivers, console applications and timer jobs.
HttpContext httpctx = HttpContext.Current;
I googled about it and found that its by design. But why by ...
0
votes
1answer
557 views
Sharepoint how to open a document for edit from console app. C#
As I mentioned on title I am trying to add check out method to my console application on C#. I will just give URL from console app. then I expect the application opens the given doc. for edit.
Which ...
0
votes
1answer
165 views
Invoking a Custom SharePoint Timer Job from a Console Application
I want to invoke a custom SPTimer Job from a console appln.
The reason is since SPTimer job cant be scheduled at regular intervals like every 4 hrs gap, the timer job needs to run, I have come up ...
0
votes
2answers
679 views
Add Or Install SharePoint App to SharePoint Online Site using console application
I have a custom app name timeSheet.app which is SharePoint hosted app. Now i want to add or install it one of my(4-7) site collection by the console application.
I don't want to upload my app in app ...
2
votes
2answers
326 views
Why SPWeb.Group provide a method named Add() that always raises exceptions (that we can not use)
I have the following inside my c# console application
using (SPSite site = new SPSite(scurl)) //site collection url
{
using (SPWeb web = site.OpenWeb(subsiteurl0)) //specific subsite url
...
0
votes
2answers
515 views
“Collection was modified; enumeration operation ..” error when removing a column
I have wrote the following code inside my console application, the purpose is to loop through all the current sub-sites, and then loop through all the current lists. If the default list view contain a ...
0
votes
2answers
3k views
Retrieve all the Document Library with folder and file count using SharePoint Client Object Model
Hi Friends i have a SharePoint site having more Document Library's i just want to display this as a Console application using SharePoint Client Object Model.
thanks in advance
2
votes
1answer
278 views
How to display all the document library and it's sub folders and the file count in C# console application?
In SharePoint 2013 site. I have many documents library and many folders inside document library.
I'm trying to display all these documents library and folders in console application.
Please ...
1
vote
1answer
2k views
How to connect office 365 site having MFA using c#
I need to connect Office 365 site using console application(c#). but the problem is office 365 tenant having MFA(Multi Factor Authentication) authentication. How can i connect to specific site ...
2
votes
2answers
3k views
How to download image from SharePoint with WebClient by image URL in C#?
In my project, i need to download the image and do some checking, then delete and re-upload it. However, i got an error when i trying to download the image.
foreach (SPListItem item in docLib....
1
vote
1answer
1k views
Getting InfoPath Form Library Fields using C# CSOM
I need to extract InfoPath form fields in C# using Client Side Object Model(CSOM) and convert it into XML file.
The code which I tried to get FormLibrary fields is
// Starting with ClientContext, ...
1
vote
1answer
2k views
How ListItem.DeleteObject() works?
I have several Lists in my site. Among them I am trying to find out duplicate values in 3 of the lists, Publisher1, Publisher2, Publisher3. I am searching in the lists and saving the duplicated ...
2
votes
2answers
561 views
Add user to SPGroup not working properly
I have wrote following code to add users to SharePoint group. It works fine and add user to the group first time. But if I remove the user from site manually and re run the app there is no exception ...
0
votes
1answer
532 views
Console application triggering event receiver
I have console application collecting data from SQL and either creates or updates the item in a SP list.
I have added an event receiver to that list, this triggers if an item has been updated and ...
2
votes
1answer
84 views
Is it possible to host console application inside sharepoint web application?
I am having .net console application, and want to host it on SharePoint 80 port.
Is it possible? If yes then how?
2
votes
1answer
211 views
Listview threshold in sharepoint 2013 via console application
I found so many questions about list view threshold in SharePoint. As Microsoft recommend items should not exceed 5000 (configurable in central admin).
So i tried a sample piece of code to check where ...
1
vote
0answers
414 views
How to create folder in document library using batch processing
I need to create bulk folder(~200) in document library. I have tried using console application but it required more time to create then i have decided to create using batch processing as suggested in ...
1
vote
1answer
181 views
Can we distribute SharePoint DLLs with our application
Is my understanding of following page correct that we can distribute Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll with our application? Like we reference these DLLs in ...
0
votes
1answer
596 views
C# Console Application after windows log off
How to keep running c# console application after login with its UI (console window) to insert data into SharePoint 2013 list item.
Windows Service & Task Scheduler will not give me UI (Console ...
3
votes
3answers
1k views
CSOM returns 403 Forbidden when checking site collection
I am creating a console application to create Subsite's, lists, list items etc. I have a simple function that checks if a SiteCollection exists and am met with a 403 Forbidden error when calling the ...
2
votes
2answers
450 views
SPSite.Exists always returns false
I am trying to determine if a site collection exists, but the SPSite.Exists method always seems to return false regardless if the site collection exists or not.
Snipp:
bool exists;
Uri uri = new Uri(...
0
votes
0answers
623 views
Secure Store Servce. Set Credentials Programmatically
I have a problem when trying to set SSS credentials for a target application using C#. Console application is used for this task.
I can successfully create a Target Application with fields, admins ...
0
votes
3answers
1k views
SP2013 - Console app on DEV server unable to connect to PROD site
I'm working on a console application in VS2012 installed on my SP2013 dev server. The app is called from a command line and sets up a new FBA account using info provided by the user. When it reaches ...
2
votes
3answers
5k views
The length of the URL for this request exceeds the configured maxUrlLength value. REST API
I was wondering if someone could help, or am I missing something. In the articles found here
http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx#bk_FileStartUpload
They refer ...
1
vote
1answer
408 views
run exe as process from sharepoint webpart
Im trying to run an exe file to create a contentdatabase and then create a sitecollection in this database, running this process is working well outside the sharepoint, but when im trying to run it ...
1
vote
1answer
7k views
An unhandled exception of type 'System.Net.WebException' occurred in Microsoft.SharePoint.Client.dll
I try to access SharePoint list from a console app in .NET. My environment doesn't have SharePoint installed one and I write code in VS 2013. I want to access SharePoint 2013 list data. When I run my ...
0
votes
0answers
240 views
Cannot connect to my SPSite
I'm facing a strange issue.
I have a console application project and added assembly Microsoft.SharePoint from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft....
0
votes
1answer
109 views
SPWeb not showing site that exists
I have migrated a site from 2007 to 2010. I then moved the site collection to a place within a subsite using site content and structure.
Everything works fine and I can see everything correctly.
...
1
vote
0answers
83 views
code for redirecting to a page from a link in excel
I have an application where all my list data is getting exproted to excel. In excel there is a link in a column. On clicking that link it should redirect to a page form excel. Require c# code for that
1
vote
1answer
214 views
How to retreive data from web analytics using console application?
I have a sharepoint site where where i have web analytics service started. I will get a rrport denoting the no of visits by the user and also below i have last modified date and no of visits by all ...
0
votes
2answers
72 views
How to find how many site colections are active in a web application using console application
I need to retreive how many sites are active in a web application using either powershell code or console application. Require the code ( also need how many users have accessed the active site ...
0
votes
1answer
66 views
How to retreive last 10 users who have logged in a site using Power shell script?
I need to retreive last 10 users who have logged in a site.(I need to chek in each site under a webapp who are the last 10 users to log in). and export it to a csv file.Require code in powershell.
0
votes
3answers
1k views
How to export list items in same order in a list to excel 2010 (console application)?
I require to export list items from a SharePoint list to Excel. The order of items in the Excel sheet should be the same as in the list.
Can somebody suggest console application code for this?
1
vote
1answer
6k views
Access the SharePoint online webservice from a console application
I tried to access a SharePoint Online web service i.e (/_vti_bin/Lists.asmx). I used the code sample provided in the following article :
http://blogs.msdn.com/b/cjohnson/archive/2011/05/14/part-2-...
0
votes
3answers
260 views
SPFolderCollection valid index arguments
SharePoint 2010, c# server object model, VS2012
Long story short, I'm trying to fetch a folder of a document library, create a new folder in it from an array of names, then fetch the new folder via ...
0
votes
1answer
184 views
Developing console applications for previous assemblies (Sharepoint 2010)
I Made a console application that changes items in a list that has a Taxonomy field.
The app works well on the Developement machine, but for some reason, when move it to production, we get this error:
...