Ok... so in the end this issue was due to access token expiring. Thought I had it properly getting new token, but it wasn't.
I couldn't find out how to refresh token so I am simply re-initiating the complete connection to get token once the first one expires.
Target .NET4.7.2, Windows Forms App template
Environment:
Windows 10
Visual Studio 2019 16.9.4
Code Setup:
We have added Microsoft.SharePoint.Online.CSOM (16.1.2111.12000) Nuget Package
We have added Microsoft .Identity.Client (4.29.0) Nuget Package
Questions:
We are basically looping...
I am reading from a database field and that field value is "test1\ntest2\ntest3\ntest4"
foreach (DataRow row in spDataTable.Rows)
{
.
.
string recipientsp = row["RecipientSP"].ToString();
.
.
}
The value in the field is "test1\ntest2\ntest3\ntest4".
Now viewing it...
I did that and in the end it showed the text as "test1\ntest2\ntest3\n". So I tried that and it still shows the \n in the text.
For the sake of time I just let it be an unlimited field size and stored as semicolon delimitted. The field is still searchable if needed via the Managed Property...
Thanks for feedback... was pulled of project for something else and now back on it.
I stored the field as you have it, but when you look at the actual value it is stored with the \r\n in the values and not showing as multiple lines. So must require more than just having the \r\n in between...
Target .NET4.7.2, Windows Forms App template
Environment:
Windows 10
Visual Studio 2019 16.9.4
Goal:
Take a comma delimited list from a table field and then store it to a multiline text metadata field.
So list in field may be "Text1,Text2,Text3,Text4) and would need to be stored to the...
Good thing is this is really for a conversion so there are no other users involved. It will be a one and done.
We just have a ton of files to be moved and they are all broken down by company / job / folder / subfolder.
Definitely a learning experience with CSOM and Sharepoint.
So in regards...
Target .NET4.7.2, Windows Forms App template
Environment:
Windows 10
Visual Studio 2019 16.9.4
Goal:
Create Folders in Root Library and then create subfolders a couple of levels deep.
Code Setup:
We have added Microsoft.SharePoint.Online.CSOM (16.1.2111.12000) Nuget Package
We have added...
Thanks for reply... I knew going doin the newer .NET Standard may be trial and error.
So I have finally gotten it to work using ClientID with Certificate INSTEAD of ClientID and Secret. This link clued me into the secret not being the path to go, but the certificate:
Working with Application...
So I think I have found that client + secret will not work, but I need client + certificate.
https://www.vrdmn.com/2019/01/working-with-application-permissions.html
I have been through so many sites I am starting to think I am getting many bits of truth, but not all in one spot.
I will build...
Target .NET5.0, Windows Forms App template
Environment:
Windows 10
Visual Studio 2019 16.9.3
Goal:
Connect to our Online Sharepoint site through our Office 365 E5.
Then be able to read settings, upload documents to site / library and set metadata.
Code Setup:
We have added...
Thanks for your quick feedback.
I had hit several sites directing me the way I went, but it did start to seem geared to server side.
I think this gets me in the correct direction.
Thanks!
I starting to think the site that pointed me to doing this sent me down the wrong path.
Perhaps I should be using the Sharepoint Client Object Model (SCOM).
Doing some research here as it is possible the above methodology was for server side work and not remote as a client.
Hello,
Using Visual Studio 2019.
I need to connect to one of our Office 365 Sharepoint Sites and have the ability to simply add files via code.
I am ONLY connect to the remote sharepoint site and do not have sharepoint server running on my Windows 10 OS.
I get an error on the very first step...
In Visual Studio 2019 there are two template types called:
Windows Forms App
A project template for creating .NET Windows Forms (Winforms)
Windows Forms App (.NET Framework)
A project for creating an application with a Windows Forms (Winforms) user interface
Is the only difference where...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.